LLVM/project bc432b9 — utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel][mlir] Add CAPIOpenACC target (#234421)

Add the CAPIOpenACC target and CAPI pass TableGen outputs in
OpenACCPassIncGen (needed after #233103 added mlir/test/CAPI/openacc.c).
DeltaFile
+34-4utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+34-41 files

LLVM/project 20a4e6e — .ci monolithic-linux.sh compute_projects.py, .github/workflows premerge.yaml

[CI] Do not explicitly build ClangIR (#234384)

This is enabled by default in check-clang after
dfd756d1b830ff810644d19ed1eb7ff5f08a8585, so need to do any more
explicit handling.
DeltaFile
+3-43.ci/compute_projects_test.py
+1-13.ci/compute_projects.py
+0-2.ci/monolithic-linux.sh
+1-1.github/workflows/premerge.yaml
+5-594 files

LLVM/project 2c09a5b — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes LoadStoreVec.cpp

[SandboxVec][LoadStoreVec] Use more accurate alignment (#231695)

Up until now LoadStoreVec used to create vector loads/stores with
align(1) regardless of the alignment of the original instructions that
got vectorized. On the other hand BundleVec used the alignment of the
first element.

This patch introduces a new VecUtils::getVecAlignment() function that
unifies both. For now we use the alignment of the first element, but
this should be improved in the future with more precise alignment
reasoning.
DeltaFile
+39-39llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_mixed_types.ll
+55-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+25-0llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+11-11llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_load_seeds.ll
+10-10llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec.ll
+3-4llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+143-643 files not shown
+151-729 files

LLVM/project 707fc8e — llvm/cmake/modules TableGen.cmake, llvm/docs CMake.md

[CMake] Add a launcher for TableGen commands (#234410)

Add `LLVM_TABLEGEN_LAUNCHER`, an empty-by-default, semicolon-separated
command prefix analogous to `CMAKE_<LANG>_COMPILER_LAUNCHER`. It applies
to commands created by `tablegen()`, including MLIR source sharding, and
lets users select a launcher independently of their compiler
configuration. I'm using this with
[`recelient`](https://github.com/bazelbuild/reclient) to distribute
tablegen actions.

Such launchers tend to regress build wall-time since most tablegen runs
are fast and staging the remote execution environment for tablegen takes
more time than it takes to run tablegen, but this can be handy for
offloading LLVM builds from "small" machines to large remote executors,
or allowing one to do multiple local builds in parallel, like with
unrelated agents, without consuming local resources.

@manasij7479 has some prototypes that teach lit to distribute test
shards with `reclient` as well, but that comes later.
DeltaFile
+15-0llvm/docs/CMake.md
+11-1llvm/cmake/modules/TableGen.cmake
+26-12 files

LLVM/project a808f8e — mlir/lib/Dialect/ControlFlow/IR ControlFlowOps.cpp, mlir/test/Dialect/ControlFlow canonicalize.mlir

[mlir][cf] Canonicalize cf.switch cases targeting ub.unreachable (#234387)

Add a canonicalization pattern for cf.switch that drops cases whose
destination block contains only ub.unreachable, mirroring the existing
DropUnreachableCondBranch pattern for cf.cond_br.
(following https://github.com/llvm/llvm-project/pull/169873)
DeltaFile
+122-0mlir/test/Dialect/ControlFlow/canonicalize.mlir
+69-4mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+191-42 files

LLVM/project c97bf0e — cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb mlir-support.cpp

[mlir][NFC] Fix mlir prettyprinter debuginfo test for MSVC (#234409)

MSVC doesn't allow reinterpret cast of an integer to its own type. The
mlir gdb prettyprinter test was doing this via a template. This caused a
failure on some Windows buildbots.

This change fixes that by doing what the template function did but
without the cast.
DeltaFile
+2-1cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
+2-11 files

LLVM/project 06f022e — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 i128-fpconv-win64.ll i128-fpconv-win64-strict.ll

[X86] Use the Win64 i128 libcall lowering for UEFI (#233114)

UEFI on x86-64 follows the Win64 ABI: clang passes `__int128` arguments
by pointer and returns the value in XMM0, and the compiler-rt builtins
built for the target expect exactly that. The backend however only
applied the Win64 lowering of the i128 division, remainder and floating
point conversion libcalls (`LowerWin64_i128OP`,
`LowerWin64_INT128_TO_FP`, `LowerWin64_FP_TO_INT128`) to Windows
triples, so for `x86_64-unknown-uefi` the halves of the operands were
passed in registers instead:

```
$ clang --target=x86_64-unknown-uefi -O2 -S i128.c   # unsigned __int128 d(a, b) { return a / b; }
...
movq    (%rcx), %rax      # low half of a in rcx
movq    8(%rcx), %r10     # high half of a in rdx
movq    (%rdx), %r8       # b in r8:r9
movq    8(%rdx), %r9
callq   __udivti3

    [16 lines not shown]
DeltaFile
+11-7llvm/lib/Target/X86/X86ISelLowering.cpp
+1-0llvm/test/CodeGen/X86/i128-fpconv-win64.ll
+1-0llvm/test/CodeGen/X86/i128-fpconv-win64-strict.ll
+1-0llvm/test/CodeGen/X86/divmod128.ll
+14-74 files

LLVM/project 767bec1 — libclc/opencl/lib/spirv/vulkan CMakeLists.txt

[libclc]: add geometric/normalize.cl to spirv/vulkan (#234300)
DeltaFile
+1-0libclc/opencl/lib/spirv/vulkan/CMakeLists.txt
+1-01 files

LLVM/project aae8470 — llvm/lib/Transforms/Scalar GVN.cpp

[GVN] Reuse EarliestEscapeAnalysis across loads when using MemorySSA (#233932)

Reuse EarliestEscapeAnalysis to reduce compile time.
DeltaFile
+7-2llvm/lib/Transforms/Scalar/GVN.cpp
+7-21 files

LLVM/project e381e4c — llvm/lib/Target/AMDGPU AMDGPUCallingConv.td AMDGPUCallLowering.cpp, llvm/test/CodeGen/AMDGPU isel-amdgpu-cs-chain-cc.ll isel-amdgpu-cs-chain-preserve-cc.ll

address comments
DeltaFile
+28-32llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-preserve-cc.ll
+25-13llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
+21-9llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
+12-12llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-cc.ll
+86-664 files

LLVM/project af75099 — clang/include/clang/Parse Parser.h, clang/include/clang/Sema DeclSpec.h

[BoundsSafety][NFC] Add late-parsed type attribute lists to declarators

This is groundwork for late-parsing type attributes in every type
position where an ordinary type attribute can appear. Ordinary type
attributes are kept on the DeclSpec, on each DeclaratorChunk and on the
Declarator. Give late-parsed type attributes the same three homes, with
nothing producing or consuming them yet.

No functional change: no caller passes a list yet, so the lists stay
empty. The next commit populates them.

Assisted-by: Opus 5.5
DeltaFile
+83-53clang/include/clang/Sema/DeclSpec.h
+14-9clang/include/clang/Parse/Parser.h
+10-4clang/lib/Parse/ParseDecl.cpp
+107-663 files

LLVM/project 773d89b — flang/unittests/Evaluate IntegerValueTest.cpp, lldb/packages/Python/lldbsuite/test/tools/lldb-dap dap_server.py

split and address review comments

Created using spr 2.0.0-beta.1
DeltaFile
+0-3,634llvm/test/Transforms/LoopVectorize/WebAssembly/memory-interleave.ll
+3,634-0llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/memory-interleave.ll
+2,342-0flang/unittests/Evaluate/IntegerValueTest.cpp
+0-2,151lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+1,363-735llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+1,308-716llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+8,647-7,236993 files not shown
+55,378-18,131999 files

LLVM/project 42394c5 — flang/unittests/Evaluate IntegerValueTest.cpp, lldb/packages/Python/lldbsuite/test/tools/lldb-dap dap_server.py

split and address review comments

Created using spr 2.0.0-beta.1
DeltaFile
+0-3,634llvm/test/Transforms/LoopVectorize/WebAssembly/memory-interleave.ll
+3,634-0llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/memory-interleave.ll
+2,342-0flang/unittests/Evaluate/IntegerValueTest.cpp
+0-2,151lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+1,363-735llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+1,308-716llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+8,647-7,236993 files not shown
+55,380-18,132999 files

LLVM/project 1aebff4 — .github/workflows libcxx-run-ab-benchmarks.yml libcxx-pr-benchmark.yml, libc/cmake/modules LLVMLibCTestRules.cmake

split and address review comments

Created using spr 2.0.0-beta.1
DeltaFile
+911-500llvm/test/Transforms/LoopVectorize/outer-loop-memory-safety.ll
+512-561libc/cmake/modules/LLVMLibCTestRules.cmake
+413-0llvm/test/Transforms/SLPVectorizer/AArch64/icmp-copyable-constant-lane.ll
+71-164.github/workflows/libcxx-pr-benchmark.yml
+204-0llvm/test/Transforms/ConstraintElimination/exact-shr.ll
+204-0.github/workflows/libcxx-run-ab-benchmarks.yml
+2,315-1,225166 files not shown
+4,480-2,177172 files

LLVM/project 52c768b — clang/lib/CodeGen CodeGenFunction.cpp CodeGenModule.cpp, clang/test/CodeGen strlen-inline-builtin.c

split and address review comments

Created using spr 2.0.0-beta.1
DeltaFile
+0-35clang/lib/CodeGen/CodeGenFunction.cpp
+34-1clang/lib/CodeGen/CodeGenModule.cpp
+1-1clang/test/CodeGen/strlen-inline-builtin.c
+35-373 files

LLVM/project 55e6508 — clang/test/CodeGen umask-inline-builtin.c memcmp-inline-builtin.c

split and address review comments

Created using spr 2.0.0-beta.1
DeltaFile
+7-105clang/test/CodeGen/memcpy-inline-builtin-no-extern.c
+25-0clang/test/CodeGen/strlen-inline-builtin.c
+24-0clang/test/CodeGen/memcmp-inline-builtin.c
+20-0clang/test/CodeGen/umask-inline-builtin.c
+76-1054 files

LLVM/project 27210bb — llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Transforms/IPO Attributor.cpp

Attributor: Add only new attributes when manifesting

manifestAttrs collected the attributes to add in an AttrBuilder, then
copied the position's attribute set into another AttrBuilder to merge
them in. Collect them in an array and merge them into the set in one
pass. This requires the attributes passed to manifestAttrs to be sorted
like an attribute set, which all callers already do. The only one
passing more than one attribute is AMDGPUAttributor, whose implicit
argument attributes are sorted.

Instructions spent in amdgpu-attributor:
  rocPRIM test_device_scan, gfx942:          770.2M -> 710.8M (-7.7%)
  Blender Cycles HIP kernel, gfx1100:        380.0M -> 379.5M (-0.1%)
  rocPRIM 16 tests, full LTO, closed world:  3019.8M -> 2855.9M (-5.4%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+58-43llvm/lib/Transforms/IPO/Attributor.cpp
+3-1llvm/include/llvm/Transforms/IPO/Attributor.h
+61-442 files

LLVM/project 58b1f80 — llvm/lib/IR Attributes.cpp

format
DeltaFile
+2-2llvm/lib/IR/Attributes.cpp
+2-21 files

LLVM/project acbfa1b — llvm/include/llvm/IR Attributes.h, llvm/lib/IR Attributes.cpp

Review comments
DeltaFile
+49-39llvm/lib/IR/Attributes.cpp
+5-4llvm/unittests/IR/AttributesTest.cpp
+2-2llvm/include/llvm/IR/Attributes.h
+56-453 files

LLVM/project 51131b0 — llvm/include/llvm/IR Attributes.h, llvm/lib/IR AttributeImpl.h Attributes.cpp

IR: Add attributes from an array to an attribute set

Add AttributeSet::addAttributes and AttributeList::addAttributesAtIndex
overloads taking an array of attributes sorted like an attribute set,
with distinct kinds. They merge the attributes into the set in one pass,
without first copying the set into an AttrBuilder and adding each
attribute to it.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+45-15llvm/lib/IR/Attributes.cpp
+37-0llvm/unittests/IR/AttributesTest.cpp
+13-0llvm/include/llvm/IR/Attributes.h
+3-2llvm/lib/IR/AttributeImpl.h
+98-174 files

LLVM/project 122e7ae — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fold 64-bit zero-extending word load feeding extsw subregister

A gprc LWZ/LWZX feeding EXTSW_32_64 is rewritten into a sign-extending
LWA/LWAX load. Extend the same fold to the 64-bit zero-extending word
loads LWZ8/LWZX8 when the EXTSW_32_64 reads their sub_32 subregister,
producing a single LWA/LWAX instead of a redundant lwz+extsw pair.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+12-12llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+13-3llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+25-152 files

LLVM/project b4b6099 — llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Add MIR examples for missed extsw+word-load fold on subregister input

A gprc LWZ/LWZX feeding EXTSW_32_64 folds into a sign-extending LWA/LWAX
load. The equivalent 64-bit zero-extending word loads (LWZ8/LWZX8) whose
sub_32 feeds EXTSW_32_64 are not folded, leaving a redundant lwz+extsw
(or lwzx+extsw) pair. Add MIR examples documenting the missed fold.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+152-6llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+152-61 files

LLVM/project 6fbf4cb — llvm/test/CodeGen/NVPTX custom-abi-preserve-reg.ll

[NVPTX][test] Gate custom-abi-preserve-reg.ll ptxas-verify on ptxas-sm_80 && ptxas-isa-9.0 (#234391)

custom-abi-preserve-reg.ll (added in #227499) compiles with
-mattr=+ptx90, which requires a CUDA 13.0+ ptxas supporting PTX ISA 9.0.
Gate %ptxas-verify on ptxas-sm_80 && ptxas-isa-9.0 instead of bare ptxas
so the test does not fail when run with an older ptxas.
DeltaFile
+1-1llvm/test/CodeGen/NVPTX/custom-abi-preserve-reg.ll
+1-11 files

LLVM/project 05efdbf — clang/test/Driver freebsd.cpp

[clang][test] Use the FreeBSD sysroot tree in freebsd.cpp (#234366)

The libc++ sysroot include path tests in freebsd.cpp were using
basic_openbsd_libcxx_tree as the sysroot. Use basic_freebsd_libcxx_tree
instead. Both trees have the same layout, so this does not change what
is being tested.
DeltaFile
+2-2clang/test/Driver/freebsd.cpp
+2-21 files

LLVM/project 5059e33 — clang/lib/CodeGen ABIInfoImpl.h, clang/lib/CodeGen/Targets WebAssembly.cpp SPIR.cpp

[clang][CodeGen] Rename isSingleElementStruct to isSingleElementRecord and factor out PPC FP/vector check (NFC) (#234054)

Two NFC refactors split out of #223481 at review request.

- Rename isSingleElementStruct to isSingleElementRecord. It decomposes
unions
as well as structures, both at the top level and in nested fields and
bases;
the new name and comment say so, so that a later isSingleElementStruct
can
  refuse unions.
- Factor the single-element floating-point/128-bit vector aggregate test
that
PPC64_SVR4_ABIInfo::computeInfo and getParamTypeAlignment each performed
  into getSingleElementFPOrVectorType.

Assisted-by: Claude Code
DeltaFile
+20-18clang/lib/CodeGen/Targets/PPC.cpp
+6-5clang/lib/CodeGen/ABIInfoImpl.h
+4-4clang/lib/CodeGen/Targets/X86.cpp
+4-4clang/lib/CodeGen/Targets/SystemZ.cpp
+3-3clang/lib/CodeGen/Targets/WebAssembly.cpp
+3-3clang/lib/CodeGen/Targets/SPIR.cpp
+40-373 files not shown
+47-449 files

LLVM/project 01ba796 — libc/src/__support/threads/linux CMakeLists.txt, libc/src/__support/threads/linux/aarch64 CMakeLists.txt

[libc][cmake] Respect the configured optimization level for the Linux thread and TLS objects

The -O3 override on the Linux thread object dates from the old approach of
reading the thread arguments off the new thread's stack, which #225384
removed; the TLS objects copied the same pattern in #225418. Neither needs
it anymore, so drop the overrides and use the optimization level configured
by CMake.

Assisted-by: Claude
DeltaFile
+0-2libc/src/__support/threads/linux/CMakeLists.txt
+0-1libc/src/__support/threads/linux/x86_64/CMakeLists.txt
+0-1libc/src/__support/threads/linux/riscv/CMakeLists.txt
+0-1libc/src/__support/threads/linux/aarch64/CMakeLists.txt
+0-54 files

LLVM/project 12de2e4 — libc/test/src/math CMakeLists.txt, libc/test/src/math/exhaustive CMakeLists.txt

[libc][cmake] Respect the configured optimization level for tests

Follow up to #126322 and #233964 for the test side: the math and stdfix
tests, hash_test and the MPFR/MPC wrappers still force -O3. Drop the
overrides so they use the optimization level configured by CMake like the
rest of the library.

Assisted-by: Claude
DeltaFile
+0-16libc/test/src/stdfix/CMakeLists.txt
+0-16libc/test/src/math/exhaustive/CMakeLists.txt
+0-8libc/test/src/math/smoke/CMakeLists.txt
+0-6libc/test/src/math/CMakeLists.txt
+2-2libc/utils/MPFRWrapper/CMakeLists.txt
+1-1libc/utils/MPCWrapper/CMakeLists.txt
+3-491 files not shown
+3-517 files

LLVM/project 5fb8e4e — .github/workflows libcxx-pr-conformance-tests.yaml

[libc++] Update macOS CI jobs to C++26 (#230136)

Currently released Xcode does not support C++29, but it supports C++26
so we should test C++26 features on it.
DeltaFile
+1-1.github/workflows/libcxx-pr-conformance-tests.yaml
+1-11 files

LLVM/project eb8ba2f — llvm/include/llvm/CodeGen SlotIndexes.h, llvm/lib/CodeGen RegAllocGreedy.cpp LiveIntervals.cpp

[CodeGen] Drop dead SlotIndexes before allocation

SlotIndexes keeps the index list entry of an erased instruction and only
clears its instruction pointer. Live range sizes are measured in slot
indexes and greedy ranks ranges by size, so the leftovers inflate some
ranges more than others and reorder allocation, spilling heavily on
register-starved functions.

Add SlotIndexes::compactIndexes() to erase them. Erased entries are
unlinked, so holding an index to one is now a bug; linkedEntry() asserts
on it. The one analysis that did was LiveIntervals, so add
removeUnreferencedIntervals() to retire the intervals responsible.

Off by default behind -greedy-compact-slot-indexes, since it changes
allocation across much of the test suite.
DeltaFile
+288-0llvm/unittests/CodeGen/SlotIndexesTest.cpp
+43-0llvm/lib/CodeGen/SlotIndexes.cpp
+32-0llvm/test/CodeGen/AMDGPU/greedy-compact-slot-indexes.ll
+23-6llvm/include/llvm/CodeGen/SlotIndexes.h
+17-0llvm/lib/CodeGen/LiveIntervals.cpp
+12-1llvm/lib/CodeGen/RegAllocGreedy.cpp
+415-71 files not shown
+419-77 files

LLVM/project 06523b8 — libc/src/__support/math exp_utils.h

Update hi range comment on exp2_eval.
DeltaFile
+7-1libc/src/__support/math/exp_utils.h
+7-11 files