LLVM/project d0ad2c6clang/lib/Frontend CompilerInvocation.cpp

[clang] Reuse driver option strings in CompilerInvocation (#202632)

CompilerInvocation emits a second copy of clang/Options/Options.inc with
OPTTABLE_STR_TABLE_CODE only to implement lookupStrInTable(). The driver
OptTable already owns the identical string table.

On an arm64 Release build, fully stripped standalone clang shrinks from
94,570,224 to 94,537,216 bytes, saving 33,008 bytes (0.035%).

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+1-5clang/lib/Frontend/CompilerInvocation.cpp
+1-51 files

LLVM/project 45deeacllvm/docs LangRef.rst LangRef.md, llvm/lib/Support UnicodeNameToCodepointGenerated.cpp

Merge branch 'main' into users/kasuga-fj/polly-limit-delin-terms
DeltaFile
+24,053-23,916llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+20,246-21,270llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+0-33,109llvm/docs/LangRef.rst
+30,305-0llvm/docs/LangRef.md
+8,882-7,730llvm/test/MC/AMDGPU/gfx12_asm_vopc.s
+6,601-5,921llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll
+90,087-91,94610,125 files not shown
+614,611-429,34410,131 files

LLVM/project 3f12bb1clang/lib/Driver/ToolChains Hexagon.cpp, clang/test/Driver hexagon-toolchain-linux.c

[Hexagon] Add scs multilib for -fsanitize=shadow-call-stack (#208833)

musl hexagon targets already select msan/asan library variants based on
the sanitizer in use; do the same for shadow-call-stack so that
-fsanitize=shadow-call-stack picks up usr/lib/scs.
DeltaFile
+47-1clang/test/Driver/hexagon-toolchain-linux.c
+18-7clang/lib/Driver/ToolChains/Hexagon.cpp
+65-82 files

LLVM/project 8eb718ellvm/test/CodeGen/AMDGPU vector-reduce-fminimum.ll vector-reduce-fmaximum.ll, llvm/test/CodeGen/WebAssembly vector-reduce.ll

[ExpandReductions] Expand fmaximum/fminimum reductions (#195169)

fixes #195111
DeltaFile
+1,640-1,695llvm/test/CodeGen/AMDGPU/vector-reduce-fminimum.ll
+1,482-1,543llvm/test/CodeGen/AMDGPU/vector-reduce-fmaximum.ll
+826-703llvm/test/CodeGen/X86/vector-reduce-fminimum.ll
+825-702llvm/test/CodeGen/X86/vector-reduce-fmaximum.ll
+54-60llvm/test/CodeGen/WebAssembly/vector-reduce.ll
+30-0llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll
+4,857-4,7034 files not shown
+4,905-4,73010 files

LLVM/project 5e98ee7mlir/lib/Dialect/OpenACC/Transforms ACCIfClauseLowering.cpp, mlir/test/Dialect/OpenACC acc-if-clause-lowering.mlir

[mlir][acc] Preserve shared data operations during if-clause lowering (#208771)

Example:
```fortran
!$acc kernels present(grid, c) if(offload_on)
do nc = 1, grid%rc%ncol
  c(1,nc) = 0
end do
c(1,1) = 0
!$acc end kernels
```

In this code, kernels restructuring can create compute constructs that
share data-entry operations with an enclosing data region. If-clause
lowering could rewrite or erase these shared operations, producing
invalid IR or duplicate erasure.

Fix: Preserve externally owned data operations, deduplicate cleanup, and
retain duplicate operand ordering while cloning local operations once.
DeltaFile
+74-27mlir/lib/Dialect/OpenACC/Transforms/ACCIfClauseLowering.cpp
+99-0mlir/test/Dialect/OpenACC/acc-if-clause-lowering.mlir
+173-272 files

LLVM/project ef72c2ellvm/include/llvm/CodeGen Rematerializer.h, llvm/lib/CodeGen Rematerializer.cpp

Replace union with existing `PointerUnion`
DeltaFile
+6-38llvm/include/llvm/CodeGen/Rematerializer.h
+11-9llvm/lib/CodeGen/Rematerializer.cpp
+17-472 files

LLVM/project 3c8b4f9clang/docs ReleaseNotes.md

[analyzer][docs] CSA release notes for clang-23 (#207433)

The commits were gathered using:
```sh
git log --reverse --oneline llvmorg-23-init..llvm/main \
  clang/lib/StaticAnalyzer clang/include/clang/StaticAnalyzer | \
  grep -v NFC | grep -v OpenACC | grep -v -i revert | grep -v -i "webkit"
```

I used the `LLVM_ENABLE_SPHINX=ON` and `LLVM_ENABLE_DOXYGEN=ON` cmake
options to enable the `docs-clang-html` build target, which generates
the html into `build/tools/clang/docs/html/ReleaseNotes.html` of which I
attach the screenshots to let you judge if it looks all good or not.

I've swapped the PR links to the issue links when a PR was fixing an
open GitHub issue. Those issues anyway have a link to the PR inside.

Assisted-by: Claude Opus 4.8
DeltaFile
+63-18clang/docs/ReleaseNotes.md
+63-181 files

LLVM/project 0380132lldb/test/API/functionalities/statusline TestStatusline.py

[lldb][test] Fix TestStatusline path resolution in symlinked environments (#209083)

Fixes a test timeout in TestStatusline.py introduced in commit
a35565161078 (#208609) when running in environments with symlinked
source paths.
DeltaFile
+1-3lldb/test/API/functionalities/statusline/TestStatusline.py
+1-31 files

LLVM/project 13dcad3clang/test/Driver amdgpu-openmp-gpu-max-threads-per-block.c

[clang][OpenMP][test] Use -fopenmp=libomp explicitly in clang driver test (#209082)

Explicitly pass -fopenmp=libomp in the test to make it robust against
downstream configurations where the default OpenMP runtime is set to
something else (e.g., libgomp). Seems this is in alignment with other
tests in `clang/test/Driver`.
DeltaFile
+1-1clang/test/Driver/amdgpu-openmp-gpu-max-threads-per-block.c
+1-11 files

LLVM/project 8e0ae49llvm/utils/lit/lit cl_arguments.py

Remove new line.
DeltaFile
+0-1llvm/utils/lit/lit/cl_arguments.py
+0-11 files

LLVM/project 6c63284clang/test/Analysis/z3 z3-logicalexpr-eval.c

[analyzer] Fix stale z3 analyzer-constraints name in test z3-logicalexpr-eval.c (#209185)

z3 was recently renamed to unsupported-z3.

Change the analyzer-constraints to unsupported-z3 in the test file
z3-logicalexpr-eval.c
DeltaFile
+1-1clang/test/Analysis/z3/z3-logicalexpr-eval.c
+1-11 files

LLVM/project ed47c35clang/test/SemaCXX amdgpu-barrier.cpp, clang/test/SemaHIP amdgpu-barrier.hip

Add test w/ static field
DeltaFile
+5-0clang/test/SemaCXX/amdgpu-barrier.cpp
+5-0clang/test/SemaHIP/amdgpu-barrier.hip
+10-02 files

LLVM/project 1de6f77clang/lib/AST Type.cpp TypePrinter.cpp, clang/lib/Basic/Targets SPIR.h

Address Comments
DeltaFile
+4-3clang/lib/AST/Type.cpp
+3-2clang/test/SemaOpenCL/amdgpu-barrier.cl
+1-4clang/lib/CodeGen/CodeGenModule.cpp
+2-2clang/lib/Basic/Targets/SPIR.h
+2-2clang/lib/AST/TypePrinter.cpp
+4-0clang/test/SemaCXX/amdgpu-barrier.cpp
+16-1311 files not shown
+29-2317 files

LLVM/project e33304cclang/include/clang/Basic DiagnosticSemaKinds.td Attr.td, clang/lib/Sema SemaAMDGPU.cpp SemaDeclCXX.cpp

Use C++ standard layout instead
DeltaFile
+60-38clang/lib/Sema/SemaAMDGPU.cpp
+38-10clang/test/SemaHIP/amdgpu-barrier.hip
+37-10clang/test/SemaCXX/amdgpu-barrier.cpp
+0-13clang/lib/Sema/SemaDeclCXX.cpp
+7-4clang/include/clang/Basic/DiagnosticSemaKinds.td
+1-1clang/include/clang/Basic/Attr.td
+143-761 files not shown
+144-777 files

LLVM/project 64b76dcclang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaDecl.cpp

Revert earlier change
DeltaFile
+1-1clang/include/clang/Basic/DiagnosticSemaKinds.td
+1-1clang/lib/Sema/SemaDecl.cpp
+2-22 files

LLVM/project bb668baclang/test/SemaCXX amdgpu-barrier.cpp, clang/test/SemaOpenCL amdgpu-barrier.cl

Add RUN lines to check Sema check works if AMDGCN is aux target
DeltaFile
+1-0clang/test/SemaCXX/amdgpu-barrier.cpp
+1-0clang/test/SemaOpenCL/amdgpu-barrier.cl
+2-02 files

LLVM/project d387f72clang/include/clang/Basic TargetInfo.h, clang/lib/AST ASTContext.cpp

Factor out check for AMDGPU types so it can be reused.
DeltaFile
+2-7clang/lib/Sema/Sema.cpp
+1-7clang/lib/AST/ASTContext.cpp
+6-1clang/lib/Sema/SemaAMDGPU.cpp
+7-0clang/include/clang/Basic/TargetInfo.h
+2-0clang/lib/Basic/TargetInfo.cpp
+1-0clang/lib/Basic/Targets/AMDGPU.cpp
+19-151 files not shown
+20-157 files

LLVM/project 6768253clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaAMDGPU.cpp SemaDeclCXX.cpp

Update implementation
DeltaFile
+19-13clang/test/SemaCXX/amdgpu-barrier.cpp
+19-13clang/test/SemaHIP/amdgpu-barrier.hip
+12-13clang/lib/Sema/SemaAMDGPU.cpp
+7-8clang/include/clang/Basic/DiagnosticSemaKinds.td
+13-0clang/lib/Sema/SemaDeclCXX.cpp
+9-1clang/test/CodeGenHIP/amdgpu-barrier-type.hip
+79-482 files not shown
+82-518 files

LLVM/project 72c6559clang/lib/AST Type.cpp, clang/lib/Sema SemaAMDGPU.cpp SemaDecl.cpp

Re-allow wrappers around named barriers
DeltaFile
+59-0clang/lib/Sema/SemaAMDGPU.cpp
+30-5clang/test/SemaCXX/amdgpu-barrier.cpp
+30-5clang/test/SemaHIP/amdgpu-barrier.hip
+23-5clang/test/SemaOpenCL/amdgpu-barrier.cl
+16-4clang/lib/AST/Type.cpp
+4-8clang/lib/Sema/SemaDecl.cpp
+162-276 files not shown
+196-3112 files

LLVM/project 19b08caclang/lib/AST Type.cpp, clang/lib/CodeGen CodeGenModule.cpp

[clang][AMDGPU] Clean-up handling of named barrier type

- Do not allow the type in struct fields. This is more like a handle/resource than a real type. It does not follow the traditional C++ object model, and using it in a struct field can do some weird things if you instantiate too many of them.
- Use a `hip_barrier` LangAS for this type that currently maps to the local AS. This allows easy switching to the barrier AS in a future patch.

Alternative to #195612, see also #195613
DeltaFile
+23-14clang/test/CodeGenHIP/amdgpu-barrier-type.hip
+13-1clang/lib/AST/Type.cpp
+9-1clang/lib/Sema/SemaDecl.cpp
+6-0clang/lib/CodeGen/CodeGenModule.cpp
+5-0clang/test/SemaOpenCL/amdgpu-barrier.cl
+5-0clang/test/SemaHIP/amdgpu-barrier.hip
+61-1616 files not shown
+89-2022 files

LLVM/project b058b69llvm/utils/lit/lit cl_arguments.py, llvm/utils/lit/tests time-tests.py

[review] Improved parsing check.
DeltaFile
+8-6llvm/utils/lit/lit/cl_arguments.py
+6-0llvm/utils/lit/tests/time-tests.py
+14-62 files

LLVM/project 72ab2a0llvm/test/CodeGen/AMDGPU local-atomicrmw-fsub.ll local-atomicrmw-fmin.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (23)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fsub.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fmin.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fadd.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fmax.ll
+10-10llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-nontemporal-metadata.ll
+8-8llvm/test/CodeGen/AMDGPU/load-atomic-local.ll
+62-6288 files not shown
+330-33094 files

LLVM/project cafd19fllvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.min.ll llvm.amdgcn.reduce.max.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (21)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.max.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.or.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.sub.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umax.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.umin.ll
+108-10894 files not shown
+491-491100 files

LLVM/project 7678cb3llvm/test/CodeGen/AMDGPU llvm.amdgcn.ptr.buffer.atomic.fadd_rtn_errors.ll llvm.amdgcn.reduce.add.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (20)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+20-20llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ptr.buffer.atomic.fadd_rtn_errors.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.add.ll
+18-18llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.and.ll
+17-17llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.fmax.ll
+17-17llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.fadd.ll
+10-10llvm/test/CodeGen/AMDGPU/llvm.amdgcn.permlane.ll
+100-10094 files not shown
+456-456100 files

LLVM/project b391da1llvm/test/CodeGen/AMDGPU llvm.amdgcn.wave.shuffle.ll llvm.frexp.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (22)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+21-21llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.shuffle.ll
+14-14llvm/test/CodeGen/AMDGPU/llvm.frexp.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.f16.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.set.rounding.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.prefetch.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.bf16.ll
+83-8394 files not shown
+567-567100 files

LLVM/project 81023fallvm/test/CodeGen/AMDGPU llvm.amdgcn.intersect_ray.ll llvm.amdgcn.fma.legacy.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (19)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+13-13llvm/test/CodeGen/AMDGPU/llvm.amdgcn.intersect_ray.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fma.legacy.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.noret.ll
+10-10llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.gather4.d16.dim.ll
+10-10llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.d16.dim.ll
+9-9llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll
+66-6693 files not shown
+451-45199 files

LLVM/project 064bd8allvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.f32.fp8.err.ll llvm.amdgcn.cvt.fp8.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (18)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+24-24llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.f32.fp8.err.ll
+13-13llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.fp8.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.sema.release.all.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.sema.v.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.sema.p.ll
+12-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.sema.br.ll
+85-8594 files not shown
+409-409100 files

LLVM/project 1f8f260llvm/test/CodeGen/AMDGPU lds-limit-diagnostics.ll isel-amdgpu-cs-chain-preserve-cc.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (17)

Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+16-16llvm/test/CodeGen/AMDGPU/lds-limit-diagnostics.ll
+12-12llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-preserve-cc.ll
+9-9llvm/test/CodeGen/AMDGPU/lds-misaligned-bug.ll
+8-8llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-cc.ll
+7-7llvm/test/CodeGen/AMDGPU/large-alloca-compute.ll
+6-6llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll
+58-5894 files not shown
+212-212100 files

LLVM/project cc048f0flang/lib/Lower/OpenMP Utils.cpp, flang/lib/Semantics check-omp-variant.cpp

[flang][OpenMP] Lowering support for declare variant. (#206988)

Add lowering support for OpenMP DECLARE VARIANT. Each directive is
recorded on its base procedure during the structure checks. During call
lowering, best variant is picked based on recorded selecter and context.

Note: this PR does not include module-file support for DECLARE VARIANT,
so cross-module variant resolution is not yet available; it will be
added in a follow-up PR.

Assisted by: Cursor
DeltaFile
+247-0flang/test/Lower/OpenMP/declare-variant-call.f90
+160-0flang/test/Lower/OpenMP/declare-variant-construct.f90
+56-15flang/lib/Semantics/check-omp-variant.cpp
+58-0flang/lib/Lower/OpenMP/Utils.cpp
+56-0flang/test/Lower/OpenMP/declare-variant-device.f90
+35-4flang/test/Semantics/OpenMP/declare-variant.f90
+612-1912 files not shown
+841-3818 files

LLVM/project 5b16979libcxx/include/__thread thread.h

[libc++] Add missing include to thread.h (#208740)

Change #195509 removed unused transitive includes, but missed adding
<__type_traits/is_integral.h> to thread.h. This caused errors
to Chromium rolls for libc++ as they caught the missing import.
DeltaFile
+1-0libcxx/include/__thread/thread.h
+1-01 files