[NewPM] Port for AArch64StackTaggingPreRA (#194021)
This patch migrates the AArch64StackTaggingPreRA pass to the New Pass
Manager.
Following the standard pattern for pass migrations:
- The core logic has been extracted into a standalone
AArch64StackTaggingPreRAImpl class.
- A new pass manager wrapper (AArch64StackTaggingPreRAPass) has been
created.
- The legacy pass manager wrapper has been renamed to
AArch64StackTaggingPreRALegacy and updated to call the shared
implementation.
- The pass is registered in AArch64PassRegistry.def to make it available
to the New PM.
[AMDGPU] Add `.amdgpu.info` section for per-function metadata
AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the compiler
must emit per-function metadata and call graph edges in the relocatable object
so the linker can compute whole-program resource requirements.
This PR introduces a `.amdgpu.info` ELF section using a tagged, length-prefixed
binary format: each entry is encoded as:
```
[kind: u8] [len: u8] [payload: <len> bytes]
```
A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags, private
segment size) and relational edges (direct calls, LDS uses, indirect call
signatures). String data such as function type signatures is stored in a
companion `.amdgpu.strtab` section.
[4 lines not shown]
[DataLayout] Add null pointer value infrastructure
Add support for specifying the null pointer bit representation per address space
in DataLayout via new pointer spec flags:
- 'z': null pointer is all-zeros
- 'o': null pointer is all-ones
When neither flag is present, the address space inherits the default set by the
new 'N<null-value>' top-level specifier ('Nz' or 'No'). If that is also absent,
the null pointer value is unknown and LLVM will not fold based on it.
No target DataLayout strings are updated in this change. This is pure
infrastructure for a future ConstantPointerNull semantic change to support
targets with non-zero null pointers (e.g. AMDGPU).
[AMDGPU][MC] Allow the nolds modifier (#185129)
Some pre-GFX11 buffer_load instructions have two variants: one
requires the lds modifier and one does not allow lds. For the latter
allow nolds to be used.
[llvm] Implement the BPF ABI (#194031)
Implements BPFTargetInfo, the first target-specific ABI lowering for the
LLVM ABI library introduced in #158329.
BPFTargetInfo mirrors the BPF ABI rules currently encoded in
`clang::BPFABIInfo` (clang/lib/CodeGen/Targets/BPF.cpp), but operates
entirely on `llvm::abi` types, keeping the logic frontend-independent:
- Empty aggregates and void returns are ignored
- Aggregates ≤64 bits are coerced to an aligned integer type
- Aggregates 65–128 bits are coerced to [2 x i64]
- Aggregates >128 bits and oversized _BitInt types are passed/returned
indirectly
- Promotable integers are sign/zero extended
- All aggregate returns are indirect
Also adds the `createBPFTargetInfo` factory function declaration to
TargetInfo.h.
[clang] Add constant evaluation support for CK_ToUnion. (#193370)
Implementation is heavily based on the evaluation code for initializer
lists, but it's different enough that I couldn't figure out a good way
to share the code.
This fixes one of the few remaining gaps where CodeGen can
constant-evaluate a value which AST can't evaluate.
[NFC][MLIR] Use `getIntrinsicSignature` to verify overloaded intrinsics (#194035)
`getIntrinsicSignature` internally handles the decoding of the IIT table
and running the match, which is what this code is doing. So, use that
instead of manually doing what `getIntrinsicSignature` does.
[NFC][NSAN] Use `getIntrinsicSignature` instead of `matchIntrinsicSignature` (#194025)
`getIntrinsicSignature` internally handles the decoding of the IIT table
and running the match, which is what this code is doing. So use that
instead of manually doing what `getIntrinsicSignature` does.
[libc] Implement wcscoll (#192778)
_Closes #191073_
- `libc/src/wchar/wcscoll.cpp` - Implementation of wcscoll
- `libc/src/wchar/wcscoll.h` - Internal header for wcscoll
- `libc/include/wchar.yaml` - Added wcscoll to public header spec
- `libc/src/wchar/CMakeLists.txt` - Added build target for wcscoll
- `libc/config/linux/x86_64/entrypoints.txt` - Registered wcscoll
entrypoint
- `libc/test/src/wchar/wcscoll_test.cpp` - Unit tests for wcscoll
- `libc/test/src/wchar/CMakeLists.txt` - Added test target for wcscoll
Note: Locale support is not yet implemented. `wcscoll` currently behaves
identically to `wcscmp` until locale support is available in llvm-libc.