LLVM/project d0617ff.ci utils.sh

[CI] Require hashes for premerge python dep installation (#221376)

This is best practice and the requirements file is already a lockfile
with hashes.
DeltaFile
+1-1.ci/utils.sh
+1-11 files

LLVM/project 7002ddallvm/lib/Object ArchiveWriter.cpp, llvm/test/tools/llvm-ar zos-write.test zos-symattrs.test

Address archive writing and test case comments.
DeltaFile
+6-5llvm/test/tools/llvm-ar/zos-symattrs.test
+8-1llvm/test/tools/llvm-ar/zos-write.test
+3-3llvm/lib/Object/ArchiveWriter.cpp
+17-93 files

LLVM/project 977f609clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenBuiltin.cpp

[CIR] Add cir.coro.intrinsic.promise Op (#221124)

This PR adds `cir.coro.intrinsic.promise`, representing
`llvm.coro.promise`, to the set of coroutine intrinsic ops. It also adds
the corresponding lowering to `llvm.coro.promise`.
DeltaFile
+23-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+12-0clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+6-2clang/test/CIR/CodeGenCoroutines/coro-builtins.cpp
+1-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+43-45 files

LLVM/project b9d19fe.ci/metrics Dockerfile

[CI] Require hashes for pip install in metrics container (#221373)

We generate the requirements lock file with hashes, but did not actually
require them before now, which is best practice.
DeltaFile
+1-1.ci/metrics/Dockerfile
+1-11 files

LLVM/project b5fe885clang/lib/CIR/CodeGen CIRGenBuiltinNVPTX.cpp, clang/test/CIR/CodeGenBuiltins/NVPTX builtins-nvptx-sync.cu

[CIR][NVPTX] Lower __nvvm_bar0_{and,or,popc} builtins (#221255)
DeltaFile
+40-1clang/test/CIR/CodeGenBuiltins/NVPTX/builtins-nvptx-sync.cu
+25-12clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+65-132 files

LLVM/project 158e0f3clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenBuiltinNVPTX.cpp, clang/test/CIR/CodeGenCUDA builtins-nvvm-atomic.cu

[CIR][NVPTX] Lower __nvvm_atom_cas_gen_* builtins (#221261)
DeltaFile
+70-0clang/test/CIR/CodeGenCUDA/builtins-nvvm-atomic.cu
+16-20clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+9-13clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+8-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+103-334 files

LLVM/project 9faf317clang-tools-extra/clang-tidy ClangTidyDiagnosticConsumer.cpp ClangTidyOptions.cpp, clang-tools-extra/test/clang-tidy/infrastructure clang-tidy-diff.cpp

[clang-tidy] Normalize windows line filter paths (#217038)

`git | clang-tidy-diff.py` emits line-filter paths with forward slashes,
while Windows compilation databases use a mix of forwards and backwards
slashes. These paths are then silently rejected (and no report is
emitted).

Reproduce on windows via:
```
git.exe diff -U0 main -- . | python clang-tidy-diff.py -p1 -path .\build"
```

Git will produce a path like:
```
my/source/file.cpp
```

The compilation database has files with entries like this:
```

    [18 lines not shown]
DeltaFile
+70-0clang-tools-extra/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp
+10-10clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
+9-9clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-diff.cpp
+10-0clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
+6-1clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
+4-1clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+109-211 files not shown
+114-217 files

LLVM/project 7fdc9a3libc/utils cmake_format.py, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

rebase

Created using spr 1.3.7
DeltaFile
+1,534-0libc/utils/cmake_format.py
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+914-0llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+790-0llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+6,335-342973 files not shown
+35,445-9,574979 files

LLVM/project 2c6e71eclang/docs/_static custom.css

[clang][docs] Widen content on medium viewports
DeltaFile
+21-0clang/docs/_static/custom.css
+21-01 files

LLVM/project 6405882clang/docs UsersManual.md

Fix text color in dark mode
DeltaFile
+1-1clang/docs/UsersManual.md
+1-11 files

LLVM/project 49b3df6clang/docs DataFlowAnalysisIntro.md, clang/docs/_static custom.css

[clang][docs] Give DataFlow figures a light background
DeltaFile
+28-7clang/docs/DataFlowAnalysisIntro.md
+4-0clang/docs/_static/custom.css
+32-72 files

LLVM/project ddc2adbclang/docs Toolchain.md ReleaseNotes.md, clang/include/clang/Basic BuiltinsAMDGPUDocs.td

[clang][docs] Remove page-local contents directives
DeltaFile
+0-10clang/docs/DriverInternals.md
+0-4clang/include/clang/Options/ClangOptionDocs.td
+0-4clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+0-4clang/docs/Toolchain.md
+0-4clang/docs/ReleaseNotes.md
+0-4clang/docs/LanguageExtensions.md
+0-3075 files not shown
+0-25481 files

LLVM/project 6d63518clang/docs conf.py, clang/docs/_static custom.css

[docs] Restore project-specific Furo CSS
DeltaFile
+0-140utils/docs/llvm_sphinx/_static/furo-common.css
+71-0llvm/docs/_static/custom.css
+60-0clang/docs/_static/custom.css
+8-0utils/docs/llvm_sphinx/__init__.py
+2-1llvm/docs/conf.py
+3-0clang/docs/conf.py
+144-1414 files not shown
+147-14210 files

LLVM/project 6ec27daclang/docs/analyzer conf.py, libc/docs/_static copybutton.js

[clang][docs] Prototype Furo theme setup
DeltaFile
+140-0utils/docs/llvm_sphinx/_static/furo-common.css
+0-71llvm/docs/_static/custom.css
+0-56llvm/docs/_static/copybutton.js
+0-56libc/docs/_static/copybutton.js
+56-0utils/docs/llvm_sphinx/_static/copybutton.js
+10-34clang/docs/analyzer/conf.py
+206-2179 files not shown
+335-39215 files

LLVM/project 2cbdbc9clang/docs CMakeLists.txt, clang/include/clang/Options ClangOptionDocs.td Options.td

[clang][docs] Generate command line reference as Markdown (#220385)

Update the Clang option documentation emitter to generate MyST Markdown
for the generated command-line reference page. I discovered and
preserved a complicated existing Sphinx program-name workaround for
option IDs that collide after punctuation normalization.

The only markup on Options.td is in the DocBrief fields, and those use
very little markup, so those were all migrated by the agent, not
rst2myst. I unindented the multi-line DocBrief bodies, because
indentation has semantics in both markdown (list indentation) and reST.

Tracking issue: #201242 

0.1288% pixels differ in the rendered HTML page.

Assisted-by: Codex
DeltaFile
+33-32clang/include/clang/Options/Options.td
+39-26clang/utils/TableGen/ClangOptionDocEmitter.cpp
+12-13clang/include/clang/Options/ClangOptionDocs.td
+6-6clang/docs/CMakeLists.txt
+90-774 files

LLVM/project 001fd82libc/utils cmake_format.py, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

rebase

Created using spr 1.3.7
DeltaFile
+1,534-0libc/utils/cmake_format.py
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+914-0llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+790-0llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+6,335-342868 files not shown
+33,227-8,697874 files

LLVM/project 7d721eclibc/utils cmake_format.py, libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap pstl.is_heap_until.pass.cpp pstl.is_heap_until_comp.pass.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,534-0libc/utils/cmake_format.py
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+1,068-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until_comp.pass.cpp
+1,064-0libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/pstl.is_heap_until.pass.cpp
+914-0llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+790-0llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+6,335-342868 files not shown
+33,227-8,697874 files

LLVM/project 5318b2dlibc/utils cmake_format.py, llvm/test/CodeGen/AArch64 sve-vector-unroll.ll

rebase

Created using spr 1.3.7
DeltaFile
+1,534-0libc/utils/cmake_format.py
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+914-0llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+790-0llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+641-0llvm/test/CodeGen/AArch64/sve-vector-unroll.ll
+639-0llvm/test/Transforms/ConstraintElimination/or-disjoint.ll
+5,483-342777 files not shown
+27,269-8,074783 files

LLVM/project 324a4cflibc/utils cmake_format.py, llvm/test/CodeGen/AArch64 sve-vector-unroll.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+1,534-0libc/utils/cmake_format.py
+965-342llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
+914-0llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+790-0llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+641-0llvm/test/CodeGen/AArch64/sve-vector-unroll.ll
+639-0llvm/test/Transforms/ConstraintElimination/or-disjoint.ll
+5,483-342777 files not shown
+27,269-8,074783 files

LLVM/project bbf0680llvm/include/llvm/Transforms/IPO LowerTypeTests.h, llvm/lib/Transforms/IPO LowerTypeTests.cpp

[NFC][LowerTypeTests] Support ordering in GlobalLayoutBuilder with Less comparator (#221044)

Allow callers to guide fragment placement in GlobalLayoutBuilder using
an optional comparator.

This is a prerequisite for
https://github.com/llvm/llvm-project/pull/221046,
which reorders CFI jump table entries according to profile and ThinLTO
call edge hotness. Passing an ordering comparator allows
GlobalLayoutBuilder
to sort elements within strict types and place the globally hottest
fragment at the end of the jump table, while preserving 100% contiguity
(single range checks without holes) for all type subsets.

PR Stack:
* https://github.com/llvm/llvm-project/pull/220776
* https://github.com/llvm/llvm-project/pull/221043
* ➤ https://github.com/llvm/llvm-project/pull/221044
* https://github.com/llvm/llvm-project/pull/221045

    [2 lines not shown]
DeltaFile
+61-0llvm/unittests/Transforms/IPO/LowerTypeTests.cpp
+26-5llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+11-2llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+98-73 files

LLVM/project b6abc5emlir/lib/Dialect/OpenACC/Transforms ACCRoutineToGPUFunc.cpp

[mlir][openacc] Avoid per-routine module walks in ACCRoutineToGPUFunc (#221345)

ACCRoutineLowering uniquifies the specialized device copy (foo -> foo_0)
while acc.specialized_routine still names the original host function.
Moving those copies into gpu.func then called replaceAllSymbolUses on
the whole module once per routine, which is quadratic in the number of
specialized routines.

Collect the src->dest renames and rewrite symbol uses in a single walk
of the module body (still skipping nested symbol tables). Insert the
gpu.func ops under the final names afterward.

On a large TU this speeds up this pass by 3.5x
DeltaFile
+60-17mlir/lib/Dialect/OpenACC/Transforms/ACCRoutineToGPUFunc.cpp
+60-171 files

LLVM/project d83d37cclang/lib/CodeGen ABIInfo.h ABIInfo.cpp, clang/lib/CodeGen/Targets AArch64.cpp X86.cpp

[clang][win] Extend scoped enum varargs for the Windows x64 ABI (#221356)

Fixes #220712

Scoped enum values don't undergo default integer promotions, so they
don't naturally get extended to 32-bit integers. However, MSVC appears
to extend scoped enum values, *specifically* when they appear as
variadic arguments, but *not* when the are passed as fixed arguments:
https://godbolt.org/z/oGozjMnEn

I think we should do the same. I think the main upshot here is that
users will be able to `printf("%d\n", my_u8_enum);` without casting to
`int` explicitly. Even if the `va_arg(ap, int)` on the printf side is
*technically* UB, this seems like a sharp corner we really ought to sand
off.

I dug up some references for how we handle this on the SysV side, and it
seems that we do extend there: a71cc1536167f44f542da2857685f01aa29c0e55


    [3 lines not shown]
DeltaFile
+34-13clang/lib/CodeGen/Targets/X86.cpp
+36-0clang/test/CodeGenCXX/windows-x86_64-varargs.cpp
+2-1clang/lib/CodeGen/Targets/AArch64.cpp
+2-1clang/lib/CodeGen/ABIInfo.h
+2-1clang/lib/CodeGen/ABIInfo.cpp
+76-165 files

LLVM/project 2bce2d4clang/lib/CodeGen/Targets WebAssembly.cpp, clang/lib/Sema SemaWasm.cpp

[WebAssembly] Add support for import and export name attributes on global vars (#201966)

Currently these attributes are only supported on functions.
This change adds support for import_name, export_module and export_name
to global variables.
For addrspace(1) global variables, which lower to wasm globals, they are
directly appended to the
wasm export. For addrspace 0 globals, the address is exported.

It also fixes the behavior of the existing export_name attribute on
functions, implementing correct
merging behavior to handle cases of duplicate or conflicting
declarations.

Assisted-by: Antigravity
DeltaFile
+96-51clang/lib/Sema/SemaWasm.cpp
+57-18clang/lib/CodeGen/Targets/WebAssembly.cpp
+39-6llvm/test/CodeGen/WebAssembly/export-name.ll
+40-0llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+29-0clang/test/CodeGen/WebAssembly/wasm-global-import.c
+26-2clang/test/Sema/attr-wasm.c
+287-7710 files not shown
+385-9016 files

LLVM/project 5478e3eclang/include/clang/Sema Sema.h, clang/lib/Sema SemaLookup.cpp

[clang][Sema] Use DenseMap for SpecialMemberCache (NFC) (#221304)

This patch replaces llvm::FoldingSet with llvm::DenseMap for
SpecialMemberCache in Sema.

SpecialMemberCache is fundamentally a key-value cache that maps a class
and qualification flags to a SpecialMemberOverloadResult.  The current
implementation is heavy because each entry in FoldingSet requires a
160-byte SpecialMemberOverloadResultEntry on the bump allocator arena.

LookupSpecialMember returns SpecialMemberOverloadResult by value.  As
such, there is no need to use the bump allocator for pointer stability.

This patch also removes FastFoldingSetNode as we are removing the last
use.

Assisted-by: Antigravity
DeltaFile
+36-36clang/lib/Sema/SemaLookup.cpp
+0-16llvm/include/llvm/ADT/FoldingSet.h
+3-7clang/include/clang/Sema/Sema.h
+39-593 files

LLVM/project 48efa49llvm/test/CodeGen/RISCV convert-to-arbitrary-fp.ll

fixup! nounwind
DeltaFile
+8-56llvm/test/CodeGen/RISCV/convert-to-arbitrary-fp.ll
+8-561 files

LLVM/project ea908bfllvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/RISCV convert-to-arbitrary-fp.ll

[SelectionDAG] Fix incorrect expansion of `CONVERT_TO_ARBITRARY_FP`
DeltaFile
+826-0llvm/test/CodeGen/RISCV/convert-to-arbitrary-fp.ll
+49-12llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+875-122 files

LLVM/project 657af0ellvm/docs DebuggingLLVM.md

[Docs] Document IR printing options (#221260)

Document the pass-by-pass IR printing options in DebuggingLLVM.md.

This covers:
- selecting passes by name or invocation number;
- change-only printing and output scope;
- filtering by pass, function, and source location;
- source-location filter syntax, matching behavior, and an example;
- persistent metadata IDs in repeated debug dumps.

This is a follow-up to #203393 and the documentation request in
https://github.com/llvm/llvm-project/pull/203393#pullrequestreview-5103117577.
DeltaFile
+57-9llvm/docs/DebuggingLLVM.md
+57-91 files

LLVM/project 7669fdallvm/include/llvm/Target TargetSelectionDAG.td, llvm/test/TableGen/GlobalISelEmitter GlobalISelEmitter.td CustomPredicate.td

[NFC][SelectionDAG] Give the contract PatFrags a GlobalISel predicate (#219725)

The contract PatFrags carried only a PredicateCode, so GlobalISelEmitter skipped every pattern built on them.

Assisted-By: Claude Code 5
DeltaFile
+17-10llvm/include/llvm/Target/TargetSelectionDAG.td
+9-0llvm/test/TableGen/GlobalISelEmitter/CustomPredicate.td
+4-1llvm/test/TableGen/GlobalISelEmitter/GlobalISelEmitter.td
+30-113 files

LLVM/project bcba495llvm/lib/Target/WebAssembly WebAssemblyLowerEmscriptenEHSjLj.cpp

Wasm: Remove unnecessary cast and error (#221179)
DeltaFile
+6-6llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+6-61 files

LLVM/project 183d180llvm/lib/Target/NVPTX NVPTXISelDAGToDAG.cpp, llvm/test/CodeGen/NVPTX volatile-local.ll

[NVPTX] Support volatile local loads and stores in PTX 9.1 (#217764)

PTX ISA 9.1 adds support for the `.volatile` qualifier with the `.local`
state space on `ld` and `st` instructions.

Emit `ld.volatile.local` and `st.volatile.local` when targeting PTX 9.1
or later. Earlier PTX versions retain the existing plain local
load/store lowering.

Add code-generation coverage for both PTX 9.0 and PTX 9.1.
DeltaFile
+56-0llvm/test/CodeGen/NVPTX/volatile-local.ll
+25-15llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+81-152 files