LLVM/project 264bb4c — llvm/lib/Object Archive.cpp, llvm/test/Object archive-symtab.test

[Object] Handle K_DARWIN64 in Archive::Symbol::getNext() (#233339)

Symbol::getNext() had no case for K_DARWIN64, so a __.SYMDEF_64 table
fell through to the generic path that advances to the next NUL in the
string table. That is only correct when the strings are stored in
ranlib_64 entry order. Tables whose ranlib_64 entries are sorted by name
while the strings stay in member order, as produced by Apple's ar,
paired symbol names with the wrong members.

Handle K_DARWIN64 together with K_BSD, parameterized by word size.
DeltaFile
+35-0llvm/test/Object/archive-symtab.test
+14-8llvm/lib/Object/Archive.cpp
+49-82 files

LLVM/project 407178b — flang/lib/Lower/OpenMP Utils.cpp, flang/test/Driver omp-driver-offload.f90

[Flang][OpenMP] Flag for switching off implicit allocatable member mapping via default declare mapper (#228748)

Part of the OpenMP specification requires implicitly mappiing
allocatable members in derived types. However, it is quite an expensive
overhead to perform implicit allocatable member mapping as it requires a
mapper to do so due to the nature of possibly nested allocatable derived
types etc. Alongside a fairly comprehensive map of the record, this in
particular comes at a fairly substantial cost for arrays of derived
types that trigger this behaviour. Some of this may or may not be
mitigatable over time.

But for the moment this PR seeks to follow the example of other Fortran
OpenMP compilers (Cray in particular I think) and utilise a flag that
can switch this behaviour on and off, so that applications not depending
on the crutch of this implicit mapping can deactivte it and not pay the
overhead, and those that like the compiler to do this for them can
continue to do so.
DeltaFile
+109-0flang/test/Lower/OpenMP/implicit-default-mapper-multiple-nested-default-mappers.f90
+40-12flang/lib/Lower/OpenMP/Utils.cpp
+52-0flang/test/Driver/omp-driver-offload.f90
+40-0flang/test/Lower/OpenMP/implicit-default-mapper-allocatable-members-flag-implicit-capture.f90
+39-0flang/test/Lower/OpenMP/implicit-default-mapper-allocatable-members-flag-explicit-map.f90
+39-0flang/test/Lower/OpenMP/implicit-default-mapper-allocatable-members-flag-nested-user-mapper.f90
+319-1212 files not shown
+405-2018 files

LLVM/project 34828d7 — lldb/source/Plugins/Process/elf-core RegisterContextPOSIXCore_ppc64le.cpp RegisterContextELFCore_ppc64le.cpp

[lldb] Rename ELF core register contexts (#239069)

The current RegisterContextPOSIXCore naming is confusing for the
following reasons:

- The filename is `RegisterContextPOSIXCore_*` but the class name is
`RegisterContextCorePOSIX_*`.
- POSIX does not require the OS to execute ELF binaries. An example of
this is macOS which runs Mach-O executables.
- Other process plugins have register context classes named
`RegisterContext<plugin's name>`, but elf-core plugin has POSIX in its
register context class name.

This happened because the base class was named RegisterContextPOSIX, but
this was renamed to `RegisterContextCore` in eeb24ee48aa2 because it was
only used by coredump process plugins and did not directly call POSIX
APIs.

To reflect the change, rename elf-core's register context class names to

    [2 lines not shown]
DeltaFile
+0-446lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
+446-0lldb/source/Plugins/Process/elf-core/RegisterContextELFCore_arm64.cpp
+0-390lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp
+390-0lldb/source/Plugins/Process/elf-core/RegisterContextELFCore_riscv32.cpp
+0-133lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
+133-0lldb/source/Plugins/Process/elf-core/RegisterContextELFCore_ppc64le.cpp
+969-96936 files not shown
+2,131-2,13142 files

LLVM/project fc9576e — llvm/lib/Target/AVR AVRCodeGenPassBuilder.cpp AVRPassRegistry.def, llvm/test/CodeGen/AVR newpm-pipeline.ll

[AVR] Port AsmPrinter to NewPM

Standard NewPM pass porting.

Reviewers: benshi001

Pull Request: https://github.com/llvm/llvm-project/pull/236491
DeltaFile
+38-0llvm/lib/Target/AVR/AVRAsmPrinter.h
+34-0llvm/lib/Target/AVR/AVRAsmPrinter.cpp
+8-0llvm/lib/Target/AVR/AVRPassRegistry.def
+4-3llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+3-0llvm/test/CodeGen/AVR/newpm-pipeline.ll
+87-35 files

LLVM/project 510906b — llvm/lib/Target/AVR AVRCodeGenPassBuilder.cpp AVRTargetMachine.cpp, llvm/test/CodeGen/AVR newpm-pipeline.ll

[AVR] Port ExpandPseudo to NewPM

Standard NewPM pass porting. Also note that this pass preserves the CFG
in the LegacyPM.

Reviewers: benshi001, arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/236482
DeltaFile
+144-110llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
+9-2llvm/lib/Target/AVR/AVR.h
+1-6llvm/lib/Target/AVR/AVRPassRegistry.def
+4-2llvm/lib/Target/AVR/AVRTargetMachine.cpp
+1-1llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+1-0llvm/test/CodeGen/AVR/newpm-pipeline.ll
+160-1216 files

LLVM/project cb96a2c — llvm/lib/Target/AVR AVRTargetMachine.cpp AVRPassRegistry.def, llvm/test/CodeGen/AVR newpm-pipeline.ll

[AVR] Port FrameAnalyze to NewPM

Standard NewPM pass porting.

Reviewers: benshi001, arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/236350
DeltaFile
+82-53llvm/lib/Target/AVR/AVRFrameLowering.cpp
+10-1llvm/lib/Target/AVR/AVR.h
+1-1llvm/lib/Target/AVR/AVRTargetMachine.cpp
+1-1llvm/lib/Target/AVR/AVRPassRegistry.def
+1-1llvm/lib/Target/AVR/AVRCodeGenPassBuilder.cpp
+1-0llvm/test/CodeGen/AVR/newpm-pipeline.ll
+96-576 files

LLVM/project 9af38df — llvm/lib/Object WasmObjectFile.cpp, llvm/test/Object/Wasm bad-section-symbol.yaml

[Object][Wasm] Validate section index and type for section symbols (#239408)

`WASM_SYMBOL_TYPE_SECTION` symbols must reference a valid custom
section, matching the check already performed for `WASM_COMDAT_SECTION`
entries in `parseLinkingSectionComdat`.

Previously, `parseLinkingSectionSymtab` did not check that the section
index was in bounds or that the referenced section was a custom section,
leading to out-of-bounds accesses in `WasmObjectFile` or a null-pointer
dereference in `wasm-ld`.

See: https://github.com/WebAssembly/tool-conventions/pull/272
Fixes: #239393
DeltaFile
+61-0llvm/test/Object/Wasm/bad-section-symbol.yaml
+7-0llvm/lib/Object/WasmObjectFile.cpp
+68-02 files

LLVM/project 0c5cea7 — compiler-rt/lib/tsan/rtl tsan_platform_linux.cpp

[tsan] Calibrate jmp_buf SP mangling lazily on Linux (#237466)

Avoid running two `_setjmp` probes during startup in binaries that never
call `longjmp`/`siglongjmp`, and unify regular Linux with Android's
on-first-use calibration from #216558 using a separate atomic flag so
zero keys (identity mangling) remain handled.

Assisted-by: Gemini
DeltaFile
+20-23compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
+20-231 files

LLVM/project 0e960d2 — libcxxabi/src/demangle ItaniumDemangle.h, libcxxabi/test DemangleTestCases.inc

[Demangle] Support template arguments on vendor extended types

The Itanium ABI grammar is 'u <source-name> [<template-args>]', but the
demangler only accepted a single type argument after the name (used for
builtin type transformations). Clang emits names such as
u11matrix_typeILm1ELm2EjE for matrix types and HLSL, which were left
mangled. Parse general template arguments; a single type argument keeps
the existing transformation output.

Part of #111345.

LLM-aided
DeltaFile
+13-7llvm/include/llvm/Demangle/ItaniumDemangle.h
+13-7libcxxabi/src/demangle/ItaniumDemangle.h
+5-0llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc
+5-0libcxxabi/test/DemangleTestCases.inc
+36-144 files

LLVM/project b1e5866 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/CodeGen WasmEHPrepare.cpp

WasmEHPrepare: Use RuntimeLibcallsInfo (#239024)

Take the function type, attributes and calling convention from
RuntimeLibcallsInfo instead of constructing them by hand. Also
validate the required functions are available.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+49-15llvm/lib/CodeGen/WasmEHPrepare.cpp
+27-0llvm/test/CodeGen/X86/wasm-eh-prepare-no-lpad-context-libcall.ll
+12-0llvm/test/CodeGen/WebAssembly/wasm-eh-prepare-missing-analysis.ll
+2-2llvm/test/CodeGen/WebAssembly/wasm-eh-prepare.ll
+2-2llvm/test/CodeGen/WebAssembly/wasm-eh-prepare-exception-model.ll
+3-1llvm/include/llvm/IR/RuntimeLibcalls.td
+95-206 files

LLVM/project 2c8c812 — llvm/test/Transforms/Attributor nofpclass-fmul.ll nofpclass-fmul-crhs.ll

[NFC] Extract fmul(x, CRHS) tests from nofpclass-fmul.ll (#239424)

Moves all `fmul(x, CRHS)` tests from `nofpclass-fmul.ll` to
`nofpclass-fmul-crhs.ll`. Also updated the tests from `--version 2` to
`--version 6`, and updated some of the literals to the modern
`f0x3F800000` form.
DeltaFile
+371-0llvm/test/Transforms/Attributor/nofpclass-fmul-crhs.ll
+0-369llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+371-3692 files

LLVM/project 03a92b9 — clang/lib/Sema SemaHLSL.cpp, clang/test/CodeGenHLSL/builtins WaveMultiPrefixCountBits.hlsl

[HLSL] Revert `WaveMultiPrefixCountBits` (#239439)

Revert commit `926040bad7abaff76e07a854f9f3edb3ca490248` (#238132) after
the Fuchsia build reports failures in the Clang
`WaveMultiPrefixCountBits` test.

Resolve the merge conflicts to remove only CountBits. Keep BitAnd,
BitXor, Product, Sum, and BitOr. Restore the original inline mask check
for those operations.

Remove the CountBits builtin, its HLSL alias, its DirectX intrinsic and
operation, and its tests. This change reverses the added and removed
lines from #238132 in all 12 affected files.

Assisted by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
Copilot-Session: 40997c2f-5aaa-41c6-8d1f-3e2e9ada315f
DeltaFile
+0-63clang/test/SemaHLSL/BuiltIns/WaveMultiPrefixCountBits-errors.hlsl
+0-45clang/test/CodeGenHLSL/builtins/WaveMultiPrefixCountBits.hlsl
+10-32clang/lib/Sema/SemaHLSL.cpp
+0-20llvm/test/CodeGen/DirectX/WaveMultiPrefixCountBits.ll
+0-9llvm/test/CodeGen/DirectX/WaveMultiPrefixCountBits_errors.ll
+0-9llvm/lib/Target/DirectX/DXIL.td
+10-1786 files not shown
+10-21112 files

LLVM/project 9631c90 — compiler-rt/lib/hwasan hwasan_platform_interceptors.h, compiler-rt/lib/msan/tests msan_test.cpp

[MSan] Intercept ftw, nftw, ftw64, and nftw64 in sanitizer_common. (#238166)

For `ftw`, `nftw`, `ftw64`, and `nftw64`, libc allocates a buffer for
path string and structs, before invoking the user-supplied callback.
They are uninstrumented in MemorySanitizer, so they trigger
false-positive use-of-uninitialized-value reports.

This PR adds `sanitizer_common` interceptors for `ftw` and `nftw` on
Linux (`SI_LINUX_NOT_ANDROID`) and `ftw64` and `nftw64` on glibc
(`SI_GLIBC`). Wrap the user callback in a thread-local trampoline that
unpoisons parameter shadow TLS and initializes the memory ranges for
arguments before forwarding to the user callback, saving and restoring
the previous callback pointer across calls to support nested
invocations. Resolve `nftw` and `nftw64` with a minimum glibc symbol
version so `dlvsym` selects `__new_nftw` rather than the legacy
`GLIBC_2.2.5` compatibility symbol that strips `FTW_ACTIONRETVAL`.

Assisted-by: Gemini
DeltaFile
+117-0compiler-rt/test/sanitizer_common/TestCases/Linux/ftw.cpp
+112-0compiler-rt/test/msan/Linux/ftw.cpp
+103-0compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+24-19compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+35-2compiler-rt/lib/msan/tests/msan_test.cpp
+6-0compiler-rt/lib/hwasan/hwasan_platform_interceptors.h
+397-212 files not shown
+404-218 files

LLVM/project ab8b6d2 — llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging RemoteJITUtils.h RemoteJITUtils.cpp, llvm/include/llvm/ExecutionEngine/Orc EPCDynamicLibrarySearchGenerator.h

[ORC] Remove dead code from EPCDynamicLibrarySearchGenerator. (#239008)

Search generators should not error on missing symbols (the search should
be allowed to fall through to subsequent generators and dylibs in the
search order). EPCDynamicLibrarySearchGenerator::tryToGenerate supports
this by using WeaklyReferencedSymbol for all search elements, but also
had an unreachable "missing symbols" error path. This commit removes the
unreachable error path, plus the now-unused `ExecutionSession&` member.
DeltaFile
+5-15llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
+7-8llvm/include/llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h
+3-5llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+3-3llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.cpp
+2-2llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+1-2llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.h
+21-353 files not shown
+24-399 files

LLVM/project 1edd9c9 — lldb/test/Shell/ObjectFile/ELF unterminated-symbol-name.yaml

[lldb] Test unterminated ELF symbol names (#239425)

Cover the ELF side of c38a7054a1d8, which only added a Mach-O test.

rdar://187064381
Assisted-by: Claude
DeltaFile
+41-0lldb/test/Shell/ObjectFile/ELF/unterminated-symbol-name.yaml
+41-01 files

LLVM/project b51bcbb — libcxx/docs/ReleaseNotes 24.rst, libcxx/include __config

Revert "[libc++] Use glibc random APIs for std::random_device on Linux (#222567)"

This reverts commit 0a69f57dd806f8fcdcf114ae6a2b73cec7fed05a.
DeltaFile
+0-27libcxx/test/libcxx/numerics/rand/rand.device/abi.compile.pass.cpp
+0-8libcxx/include/__config
+4-4libcxx/include/__random/random_device.h
+0-4libcxx/docs/ReleaseNotes/24.rst
+0-1libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
+0-1libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
+4-451 files not shown
+4-467 files

LLVM/project 5c47d93 — llvm amgpu-waves-per-eu.md

Delete spuriously added file (#239433)

Added by #215598.
DeltaFile
+0-96llvm/amgpu-waves-per-eu.md
+0-961 files

LLVM/project cd6f2e1 — clang/docs ReleaseNotes.md, clang/lib/Sema SemaDecl.cpp SemaDeclAttr.cpp

fixup! [Clang][Smea] Accept weak reference after declaration
DeltaFile
+9-26clang/lib/Sema/SemaDeclAttr.cpp
+24-6clang/test/Sema/pragma-weak.c
+19-2clang/test/SemaCXX/pragma-weak.cpp
+18-0clang/lib/Sema/SemaDecl.cpp
+12-0clang/test/CodeGenCXX/pragma-weak.cpp
+4-2clang/docs/ReleaseNotes.md
+86-361 files not shown
+88-367 files

LLVM/project ee348f2 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls aarch64.ll

RuntimeLibcalls: Add signatures for the SME ABI support routines (#239366)

Use the prototypes from the AArch64 SME ABI. __arm_sme_state returns two
64-bit values.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+40-40llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+9-8llvm/include/llvm/IR/RuntimeLibcalls.td
+49-482 files

LLVM/project 3844c99 — clang/lib/Parse ParseExpr.cpp

[clang][Parse][NFC] Share parsing for astype and convertvector builtins (#239107)

Share the parsing logic for __builtin_astype and
__builtin_convertvector, then dispatch to their respective Sema actions.
Preserve diagnostics and error recovery.
DeltaFile
+7-31clang/lib/Parse/ParseExpr.cpp
+7-311 files

LLVM/project 1a3dcd0 — clang/lib/Sema SemaDeclCXX.cpp

[clang][Sema][NFC] Share constexpr statement traversal (#239210)

Share child-statement traversal in CheckConstexprFunctionStmt and
simplify boolean result forwarding. Preserve language-version checks,
traversal order, and diagnostic locations.
DeltaFile
+20-48clang/lib/Sema/SemaDeclCXX.cpp
+20-481 files

LLVM/project 0be6d4e — clang/include/clang/Driver ToolChain.h, clang/lib/Driver/ToolChains Linux.cpp Clang.cpp

[HIP] Use positional ordering for ROCm include paths

Instead of using path-based heuristics to choose between -idirafter and
-internal-isystem for the ROCm include path, split AddHIPIncludeArgs
into two phases:

- Early phase (AddHIPIncludeArgs): emits wrapper headers (cuda_wrappers/)
  before C++ stdlib headers, preserving #include_next chains.
- Late phase (AddHIPIncludeArgsLate): emits the ROCm toolkit include
  path after C++ stdlib but before C system headers, so the selected
  ROCm installation's HIP headers always take precedence over any
  distro-installed copies in /usr/include.

This replaces the previous conditional that compared the include path
against {SysRoot}/usr/ to decide the flag. That approach had two bugs
identified in review: a double-slash with trailing-slash sysroots, and
/usr/local/rocm still using -idirafter. The positional approach handles
all install locations uniformly without path comparisons.

Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+31-19clang/lib/Driver/ToolChains/AMDGPU.cpp
+11-8clang/test/Driver/hip-include-path.hip
+1-10clang/test/Driver/rocm-detect.hip
+6-0clang/lib/Driver/ToolChains/Clang.cpp
+6-0clang/include/clang/Driver/ToolChain.h
+5-0clang/lib/Driver/ToolChains/Linux.cpp
+60-374 files not shown
+71-3710 files

LLVM/project 24a37c2 — clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/Dialect/IR CIRAttrs.cpp

[CIR] Add unadjusted align to the CIR record layout (#238913)

The unadjusted align of a record (the alignment calculated by the AST
before adjustments such as attributes are applied) is needed to perform
ABI classification for AArch64 targets. This change adds this field to
the CIR RecordLayoutAttr but does not yet enable the AArch64 calling
convention lowering. That will be done in a future change.

Assisted-by: Cursor / various models
DeltaFile
+83-0clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+19-9clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
+14-11clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+21-0clang/test/CIR/IR/record-layout.cir
+15-0clang/unittests/CIR/RecordTypeMetadataTest.cpp
+11-0clang/test/CIR/IR/invalid-record-layout.cir
+163-202 files not shown
+168-228 files

LLVM/project e214f7a — clang/lib/Sema SemaAMDGPU.cpp, llvm/lib/Target/AMDGPU SMInstructions.td

[AMDGPU] Validate prefetch length and cache policy operands (#232143)

Two operands of the AMDGPU prefetch intrinsics, the length and the cache
policy, are not validated. An out-of-range length is encoded differently
from what the assembly says, and an out-of-range cache policy is
silently miscompiled or rejected late by the backend.

Fixes:
- Length: Instruction selection now keeps only the low 5 bits of a
constant length, so the assembly shows the value that is encoded. The
object code is the same as before. As a safeguard for hand-written
assembly, including inline `asm`, the assembler on GFX12 and later now
rejects an immediate length that does not fit in 5 bits instead of
silently truncating it.
- Cache policy: clang and the IR verifier now reject a cache policy that
sets any bit other than th (bits 0-2), scope (bits 3-4) and nv (bit 5),
or that uses the reserved th value 7. The assembler needs no change: it
already rejects th 7.
DeltaFile
+77-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.prefetch.data.ll
+37-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.prefetch.inst.ll
+19-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+16-0clang/lib/Sema/SemaAMDGPU.cpp
+10-5llvm/lib/Target/AMDGPU/SMInstructions.td
+14-0llvm/test/Verifier/AMDGPU/intrinsic-prefetch.ll
+173-58 files not shown
+220-714 files

LLVM/project 7a19899 — clang/docs ReleaseNotes.md, clang/lib/Driver/ToolChains Cuda.cpp

[clang][CUDA] Search include/cccl of CUDA 13 installations (#235910)

From CUDA 13.0 on, the CUDA C++ Core Libraries (libcu++, CUB and Thrust)
are in `include/cccl` of the CUDA installation rather than in
`include/`. Some of the toolkit's own headers include them, so with CUDA
13 something as simple as `#include <cooperative_groups.h>` fails to
compile with Clang:

```
cooperative_groups/details/info.h: fatal error:
    'cuda/std/type_traits' file not found
```

nvcc searches `include/cccl` right after `include/`. This makes Clang do
the same, when the directory exists. `-nogpuinc` still leaves it out,
and the user's own include directories are still searched first.

The HIP toolchain already does the equivalent for
[`include/libhipcxx`](https://github.com/llvm/llvm-project/blob/fe84f6e3b0ae40ef28998cd9cee3220eec2ea261/clang/lib/Driver/ToolChains/AMDGPU.cpp#L617-L624).

Assisted-by: Devin
DeltaFile
+27-0clang/test/Driver/cuda-cccl-include.cu
+9-0clang/lib/Driver/ToolChains/Cuda.cpp
+7-0clang/test/Driver/Inputs/CUDA_130/usr/local/cuda/include/cuda.h
+6-0clang/docs/ReleaseNotes.md
+0-0clang/test/Driver/Inputs/CUDA_130/usr/local/cuda/nvvm/libdevice/libdevice.10.bc
+0-0clang/test/Driver/Inputs/CUDA_130/usr/local/cuda/lib64/.keep
+49-03 files not shown
+49-09 files

LLVM/project 2cbc63c — llvm/include/llvm/IR RuntimeLibcallsImpl.td RuntimeLibcalls.td, llvm/lib/IR RuntimeLibcalls.cpp

RuntimeLibcalls: Add signatures for the Darwin sincos stret functions

__sincos_stret and __sincosf_stret return a struct holding the 2
results. Describe the C struct return type in the signature table and
lower for the target ABI. This is a vector on x86-64 for float,
through memory on x86-32 and APCS ARM, and as a struct elsewhere.
This replaces the special case that built the types in C++. Ideally we
would be using the ABI library, but it's incomplete for most targets
and it requires some relayering to use here.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+57-45llvm/lib/IR/RuntimeLibcalls.cpp
+10-0llvm/include/llvm/IR/RuntimeLibcalls.h
+3-3llvm/include/llvm/IR/RuntimeLibcalls.td
+3-0llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+2-0llvm/test/TableGen/RuntimeLibcallEmitter.td
+75-485 files

LLVM/project 2bb6d7c — llvm/lib/IR RuntimeLibcalls.cpp, llvm/lib/Transforms/Utils DeclareRuntimeLibcalls.cpp

RuntimeLibcalls: Describe the stack guard and safestack variables

The stack guard and the unsafe stack pointer are global variables, not
functions. Describe them as variables in the signature table, with the
unsafe stack pointer thread local in the alloca address space, and
declare them as globals.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+15-15llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+12-12llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+9-9llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+15-1llvm/lib/IR/RuntimeLibcalls.cpp
+13-0llvm/lib/Transforms/Utils/DeclareRuntimeLibcalls.cpp
+6-6llvm/test/Transforms/Util/DeclareRuntimeLibcalls/riscv.ll
+70-4314 files not shown
+139-8720 files

LLVM/project 6d54fdb — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/Transforms/Util/DeclareRuntimeLibcalls arm64ec.ll aarch64.ll

RuntimeLibcalls: Add a signature for the stack probe functions

The stack probe functions are assembly routines with their own unnamed
calling convention. The allocation size is passed in a fixed register
that is not the standard first argument register (rax/eax on x86, x15
in 16-byte units on AArch64, r4 in 4-byte units on ARM), almost all
registers are preserved, and the i386 _alloca variant also moves the
stack pointer. It's not ideal, but short of defining a custom calling
convention, just declare them with no arguments.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+4-4llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+2-2llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+1-1llvm/test/Transforms/Util/DeclareRuntimeLibcalls/arm64ec.ll
+1-1llvm/include/llvm/IR/RuntimeLibcalls.td
+8-84 files

LLVM/project deae673 — llvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU twoaddr-wmma.mir

[AMDGPU] Update src2 live range when converting WMMA to three-address form

Since #225174, `LiveIntervals` is computed before the two-address instruction
pass. A two-address WMMA ties `src2` to an early-clobber `vdst`, so if `src2`
dies at the WMMA, its live range ends at the early-clobber slot. When the pass
converts the WMMA to the three-address form, `src2` is no longer tied and is
read at the register slot, but `SIInstrInfo::convertToThreeAddress` only updates
the live range of the def. The machine verifier then reports "Live segment
ending at early clobber slot must be redefined by an EC def in the same
instruction".

This PR moves the end of such a segment to the register slot, for the main range
and the subranges.

Fixes LCOMPILER-3197.
DeltaFile
+36-0llvm/test/CodeGen/AMDGPU/twoaddr-wmma.mir
+22-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+58-02 files

LLVM/project 6273f26 — flang-rt/lib/runtime CMakeLists.txt temporary-stack.cpp, flang/include/flang/Runtime temporary-stack.h

[flang-rt][cuda] Add support to build temporary-stack (#239403)

These functions are used when lowering some forall statements. It would
fails to link with code like:

```fortran
!$acc serial copyin(k) copyout(kk,kkk,kkkk)
forall (n=1:nb)
kk(n,:)=k(n,:)
kk(n,:)=kk(n,:)+1
kkk(n,:)=k(n,:)
kkk(n,:)=kkk(n,:)+1
kkkk(n,:)=k(n,:)
kkkk(n,:)=kkkk(n,:)+1
end forall
!$acc end serial
```
DeltaFile
+36-30flang-rt/lib/runtime/temporary-stack.cpp
+10-10flang/include/flang/Runtime/temporary-stack.h
+1-0flang-rt/lib/runtime/CMakeLists.txt
+47-403 files