Changes

Summary

  1. [lldb] improve the help strings for gdb-remote and kdp-remote (details)
  2. [cuda] Add address space predicate funuctions. (details)
  3. [lldb/test] Update test/API/functionalities/load_lazy to macOS 12 (details)
  4. [driver] Explicitly specify `-fbuild-session-timestamp` in seconds. (details)
  5. [fir] Add character utility functions in FIRBuilder (details)
  6. [x86] add tests for psubus; NFC (details)
  7. [clang][Driver] Make multiarch output file basenames reproducible (details)
  8. [x86] add special-case lowering for usubsat for pre-SSE4 (details)
  9. [Driver][Gnu] Delete unneeded -Bstatic dispatch for arm/thumb (details)
  10. [llvm-reduce] Add reduction passes to reduce operands to undef/1/0 (details)
  11. [WebAssembly] Emit clangast in custom section aligned by 4 bytes (details)
Commit 8ac5a6641fa4d742fb4599b485c40700e773f01f by Lawrence D'Anna
[lldb] improve the help strings for gdb-remote and kdp-remote

The help string can be more helpful by explaining these are
aliases for 'process connect'

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D111965
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
Commit 6fe902daf931dedf6e958b43c043cb57bb612daf by michael.hliao
[cuda] Add address space predicate funuctions.

- Add the missing NVVM predicate builtins on address space checking
- Redefine them as pure functions so that they could be used in
  __builtin_assume.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D112053
The file was modifiedclang/lib/Headers/__clang_cuda_runtime_wrapper.h
The file was modifiedclang/include/clang/Basic/BuiltinsNVPTX.def
Commit 5e004b03f72a17f916b93792eb778dfa9e7a09cc by Vedant Kumar
[lldb/test] Update test/API/functionalities/load_lazy to macOS 12

In macOS 12, dyld switched to using chained fixups. As a result, all symbols
are bound at launch and there are no lazy pointers any more. Since we wish to
import/dlopen() a dylib with missing symbols, we need to use a weak import.
This applies to all macOS 12-aligned OS releases, e.g. iOS 15, etc.

rdar://81295101

Differential Revision: https://reviews.llvm.org/D112034
The file was modifiedlldb/test/API/functionalities/load_lazy/Makefile
Commit 91e19f66e51ac3fda2309f5e67b02fcccd4d58a0 by vsapsai
[driver] Explicitly specify `-fbuild-session-timestamp` in seconds.

Representation of the file's last modification time depends on the file
system and isn't guaranteed to be in seconds. Cast to seconds explicitly
and tighten the test case to check the magnitude of the calculated
value, so we can catch passing milliseconds or nanoseconds.

rdar://83915615

Differential Revision: https://reviews.llvm.org/D111205
The file was modifiedclang/test/Driver/modules.m
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit c983aeddcf5af992d2a807d3f4f8cdc27cbf63b1 by clementval
[fir] Add character utility functions in FIRBuilder

Extract part of D111337 in order to mke it smaller
and easier to review. This patch add some utility
functions to the FIRBuilder.

Add the following utility functions:
- getCharacterLengthType
- createStringLiteral
- locationToFilename
- characterWithDynamicLen
- sequenceWithNonConstantShape
- hasDynamicSize

These bring up the BoxValue implementation together with it.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: AlexisPerry

Differential Revision: https://reviews.llvm.org/D112074

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was modifiedflang/lib/Optimizer/Builder/CMakeLists.txt
The file was addedflang/include/flang/Optimizer/Builder/BoxValue.h
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h
The file was addedflang/lib/Optimizer/Builder/BoxValue.cpp
The file was modifiedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was addedflang/include/flang/Optimizer/Support/Matcher.h
The file was modifiedflang/lib/Optimizer/Dialect/FIRType.cpp
Commit e2faf721b2b9597ed4a68f52fdffb14b6cb7db7c by spatel
[x86] add tests for psubus; NFC
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
Commit 17386cb4dc89afad62623b9bc08516b99b9c6df7 by keithbsmiley
[clang][Driver] Make multiarch output file basenames reproducible

When building a multiarch MachO binary, previously the intermediate
output file names would contain random characters. On macOS this
filename, since it's used when linking, ended up being used as a
stable-ish identifier for the adhoc codesignature of the binary, leading
to non-reproducible binaries. This change uses the architecture, when
available, to create a stable, but unique, basename for the file.

Differential Revision: https://reviews.llvm.org/D111269
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/test/Driver/darwin-dsymutil.c
Commit 92a0389b0425a9535a99a0ce13ba0eeda2bce7ad by spatel
[x86] add special-case lowering for usubsat for pre-SSE4

usubsat X, SMIN --> (X ^ SMIN) & (X s>> BW-1)

This would be a regression with D112085 where we combine to
usubsat more aggressively, so avoid that by matching the
special-case where we are subtracting SMIN (signmask):
https://alive2.llvm.org/ce/z/4_3gBD

Differential Revision: https://reviews.llvm.org/D112095
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 922bf57fc8fe41ebcbbe581a7c8e730fbebf572f by i
[Driver][Gnu] Delete unneeded -Bstatic dispatch for arm/thumb

Historically -static and -Bstatic are synonym.
gold made the semantics of -static slightly stronger but that does not matter.
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
Commit 9660563950aaed54020bfdf0be07e7096a9553e4 by aeubanks
[llvm-reduce] Add reduction passes to reduce operands to undef/1/0

Having non-undef constants in a final llvm-reduce output is nicer than
having undefs.

This splits the existing reduce-operands pass into three, one which does
the same as the current pass of reducing to undef, and two more to
reduce to the constant 1 and the constant 0. Do not reduce to undef if
the operand is a ConstantData, and do not reduce 0s to 1s.

Reducing GEP operands very frequently causes invalid IR (since types may
not match up if we index differently into a struct), so don't touch GEPs.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D111765
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
The file was modifiedllvm/tools/llvm-reduce/DeltaManager.cpp
The file was modifiedllvm/test/tools/llvm-reduce/remove-operands.ll
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceOperands.h
The file was modifiedllvm/test/tools/llvm-reduce/remove-invoked-functions.ll
Commit 1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9 by sbc
[WebAssembly] Emit clangast in custom section aligned by 4 bytes

Emit __clangast in custom section instead of named data segment
to find it while iterating sections.
This could be avoided if all data segements (the wasm sense) were
represented as their own sections (in the llvm sense).
This can be resolved by https://github.com/WebAssembly/tool-conventions/issues/138

And the on-disk hashtable in clangast needs to be aligned by 4 bytes,
so add paddings in name length field in custom section header.

The length of clangast section name can be represented in 1 byte
by leb128, and possible maximum pads are 3 bytes, so the section
name length won't be invalid in theory.

Fixes https://bugs.llvm.org/show_bug.cgi?id=35928

Differential Revision: https://reviews.llvm.org/D74531
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedclang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
The file was addedllvm/test/MC/WebAssembly/custom-section-alignment.ll
The file was addedclang/test/PCH/pch-wasm.c