LLVM/project d990688clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp CIRABIRewriteContext.h, clang/test/CIR/Transforms/abi-lowering expand-struct-arg.cir

[CIR] Implement ArgKind::Expand in CallConvLowering (#201718)

ArgKind::Expand classifies a struct argument for flattening: each field
becomes a separate scalar argument at the ABI level.  Classic CodeGen
calls this "struct expansion" — used on targets like MIPS and some ARM
calling conventions.

CIRABIRewriteContext previously emitted errorNYI at both classification
sites.  The replacement covers three call paths.  In buildNewArgTypes,
the original struct type is replaced by one wire type per field.  In
insertArgCoercion, the single struct block argument is replaced by N
scalar block arguments and an alloca+get_member+store+load sequence at
the entry block reassembles them for body uses; a running block-argument
index (rather than classIdx + sretOffset) correctly tracks the expanded
slot count when multiple Expand args or sret+Expand combinations appear.
The Ignore-drop loop gains a classToBlockArg pre-computation so that
Ignore args following Expand args are erased at the correct index.  In
rewriteCallSite, cir.extract_member decomposes the struct operand into
its constituent fields, which become separate call arguments.

    [2 lines not shown]
DeltaFile
+232-87clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+280-0clang/test/CIR/Transforms/abi-lowering/expand-struct-arg.cir
+2-2clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.h
+514-893 files

LLVM/project a18c09aclang/lib/UnifiedSymbolResolution USRGeneration.cpp, clang/test/Analysis/Scalable/PointerFlow entity-name-no-conflict.cpp

[clang][index][USR] GenLoc prints file entry at most once, allow repeated offsets (#205430)

`GenLoc` previously printed the source location at most once per USR,
gated by a member flag toggled on the first call. During the recursive
visit, if both an outer and an inner decl needed to print the location,
only the outer one was printed. When the outer decl did not need the
offset, no offset was ever printed. For example, the USR of
`Holder<decltype([]{})>::method` depends on the location of the type of
the lambda but the outer decl prints the file entry only, which disables
offset printing.

Change the logic so the file-entry part of the location is printed at
most once (it must be identical), while offsets of sub-decl locations
may be printed multiple times.

rdar://180654884

---------

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+85-0clang/unittests/Index/IndexTests.cpp
+42-11clang/lib/UnifiedSymbolResolution/USRGeneration.cpp
+2-3clang/test/Analysis/Scalable/PointerFlow/entity-name-no-conflict.cpp
+129-143 files

LLVM/project 1774a65clang/lib/CodeGen CGCUDANV.cpp, clang/test/CodeGenCUDA offload_via_llvm.cu

[Offload] Unify the kernel argument passing (#205224)

Summary:
Currently we have two conflicting methods of passing kernel arguments, a
flat pointer + size and an array of pointers. We recently decided to
move the offload API to the latter because it is more generic and lets
you construct the other formats.

This PR primarily just changes the format and the one existing core use.
The uses should be simplier now. Future changes will change the OpenMP
argument parsing.
DeltaFile
+28-21clang/test/CodeGenCUDA/offload_via_llvm.cu
+3-43offload/plugins-nextgen/cuda/src/rtl.cpp
+8-38offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
+16-27offload/plugins-nextgen/amdgpu/src/rtl.cpp
+13-16clang/lib/CodeGen/CGCUDANV.cpp
+5-7offload/include/Shared/APITypes.h
+73-1526 files not shown
+83-16312 files

LLVM/project 1f46c12clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver gpu-exceptions.cpp

[Clang] Disable C++ exceptions by default for GPU targets (#205402)

Summary:
Exceptions are not supporter, and likely will never be supported, on
GPUs. The SIMT model makes context switching nearly impossible, and
building an unwinder would require stashing a register file that is
over 8 KiB these days. There's precedent to disable this for the target,
so we should just do this.

Offloading languages have their own weird handling, some chimera that
just accepts exceptions but turns them into traps on the device side, so
we leave that unaffected.
DeltaFile
+26-0clang/test/Driver/gpu-exceptions.cpp
+6-3clang/lib/Driver/ToolChains/Clang.cpp
+32-32 files

LLVM/project 29bf2c4mlir/test/IR visitors.mlir, mlir/test/lib/IR TestVisitors.cpp

[mlir] Fix visitor block erasure (#205854)

I made the visitor test drop block-defined value uses before erasing the
block and added a small regression case.
Fixes #205717
DeltaFile
+26-0mlir/test/IR/visitors.mlir
+1-0mlir/test/lib/IR/TestVisitors.cpp
+27-02 files

LLVM/project 8d758c0flang/test/Semantics cuf05.cuf

[flang] Fix testcase after 0b328bc6a50becb35ebfb158dd3de69bd32c5563
DeltaFile
+5-5flang/test/Semantics/cuf05.cuf
+5-51 files

LLVM/project ad850b8libcxx/include/__ranges split_view.h, libcxx/test/libcxx/ranges/range.adaptors/range.split nodiscard.verify.cpp

[libc++][ranges] Applied `[[nodiscard]]` to `split_view` (#205161)

Towards #172124

# References:

- https://wg21.link/range.split
-
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant

---------

Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+53-0libcxx/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp
+6-6libcxx/include/__ranges/split_view.h
+59-62 files

LLVM/project 9b84d3blibcxx/include/__ranges take_while_view.h, libcxx/test/libcxx/ranges/range.adaptors/range.take_while nodiscard.verify.cpp

[libc++][ranges] Applied `[[nodiscard]]` to `take_while_view` (#205172)

Towards #172124

# References:
- https://wg21.link/range.take_while
-
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant

Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+83-0libcxx/test/libcxx/ranges/range.adaptors/range.take_while/nodiscard.verify.cpp
+8-8libcxx/include/__ranges/take_while_view.h
+91-82 files

LLVM/project c9f4ba0llvm/test/CodeGen/AMDGPU use-sgpr-multiple-times.ll gep-address-space.ll

AMDGPU: Avoid default subtarget in hand-written codegen tests (9/9) (#205792)

Fix some manual test checks using amdgcn triples without -mcpu. These
require the most careful consideration. The highest impact changes are the
optimizations removing execz branch now that there's a sched model.
DeltaFile
+6-14llvm/test/CodeGen/AMDGPU/use-sgpr-multiple-times.ll
+6-10llvm/test/CodeGen/AMDGPU/gep-address-space.ll
+7-7llvm/test/CodeGen/AMDGPU/setcc.ll
+4-6llvm/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll
+4-4llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
+3-3llvm/test/CodeGen/AMDGPU/schedule-amdgpu-trackers.ll
+30-441 files not shown
+32-467 files

LLVM/project f9aa739llvm/test/CodeGen/AMDGPU wave_dispatch_regs.ll zext-lid.ll

AMDGPU: Avoid default subtarget in hand-written codegen tests (8/9) (#205791)

Introduce the missing -mcpu argument to some tests which are not
autogenerated.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+2-2llvm/test/CodeGen/AMDGPU/wave_dispatch_regs.ll
+2-2llvm/test/CodeGen/AMDGPU/zext-lid.ll
+1-1llvm/test/CodeGen/AMDGPU/vop-shrink.ll
+1-1llvm/test/CodeGen/AMDGPU/waitcnt-trailing.mir
+1-1llvm/test/CodeGen/AMDGPU/waitcnt-no-redundant.mir
+1-1llvm/test/CodeGen/AMDGPU/zext-i64-bit-operand.ll
+8-86 files

LLVM/project 988a1a2llvm/test/CodeGen/AMDGPU trap.ll ran-out-of-registers-errors.ll

AMDGPU: Avoid default subtarget in hand-written codegen tests (7/9) (#205790)

Introduce an -mcpu argument to tests missing it to avoid codegening
the default dummy target. These are cases that didn't require adjusting
the check lines.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+18-18llvm/test/CodeGen/AMDGPU/trap.ll
+5-5llvm/test/CodeGen/AMDGPU/ran-out-of-registers-errors.ll
+4-4llvm/test/CodeGen/AMDGPU/set-wave-priority.ll
+2-2llvm/test/CodeGen/AMDGPU/madak-inline-constant.mir
+2-2llvm/test/CodeGen/AMDGPU/subreg-intervals.mir
+2-2llvm/test/CodeGen/AMDGPU/machinelicm-convergent.mir
+33-3394 files not shown
+142-142100 files

LLVM/project c002097llvm/lib/Transforms/Vectorize VPlan.cpp VPlanHelpers.h

[VPlan] Remove unused VPlanPrinter::getOrCreateName(const VPBlockBase*) (#205896)

The block-name printers use getName()/getUID() directly; this overload
has no callers.
DeltaFile
+0-7llvm/lib/Transforms/Vectorize/VPlan.cpp
+0-2llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+0-92 files

LLVM/project c6608a2clang/test/AST ast-dump-openmp-teams-distribute-parallel-for.c, llvm/test/CodeGen/AMDGPU div_v2i128.ll bf16.ll

Merge branch 'main' into users/kparzysz/c02-directive-wording
DeltaFile
+2,592-2,587llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+1,940-1,931llvm/test/CodeGen/AMDGPU/bf16.ll
+1,410-1,359llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
+1,351-1,351llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
+1,701-810llvm/test/CodeGen/AMDGPU/llvm.set.rounding.ll
+0-2,193clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
+8,994-10,2312,239 files not shown
+89,921-85,0272,245 files

LLVM/project 6cdf11cclang-tools-extra/test/clang-doc basic-project.mustache.test, clang-tools-extra/test/clang-doc/html compound-constraints.cpp enum.cpp

Fix whitespace in test files
DeltaFile
+8-8clang-tools-extra/test/clang-doc/html/compound-constraints.cpp
+3-3clang-tools-extra/test/clang-doc/json/class-template.cpp
+2-2clang-tools-extra/test/clang-doc/basic-project.mustache.test
+2-2clang-tools-extra/test/clang-doc/json/templates.cpp
+0-3clang-tools-extra/test/clang-doc/html/enum.cpp
+1-2clang-tools-extra/test/clang-doc/yaml/conversion_function.cpp
+16-2018 files not shown
+26-3924 files

LLVM/project 4b7b7ecflang/lib/Semantics check-omp-structure.cpp

format
DeltaFile
+2-1flang/lib/Semantics/check-omp-structure.cpp
+2-11 files

LLVM/project 0f1abfeflang/lib/Semantics check-omp-structure.cpp check-omp-structure.h, flang/test/Semantics/OpenMP clause-validity01.f90 device-constructs.f90

[flang][OpenMP] Move clause validity checks into OpenMP-specific code (#205607)

The checks for syntactic properties of clauses (e.g. uniqueness, being
required, etc.) were originally handled by infrastructure common to
OpenMP and OpenACC. That infrastructure, however, is not fully equipped
to handle OpenMP needs: being unable to express version-based properties
or clause set properties being two prominent examples.

The first step towards fulfilling the OpenMP requirements it is to
transfer the handling of clause validity checks into OpenMP-specific
code, which can then be modified without interfering with OpenACC.

In addition to that, this PR also changes the way that clauses on end-
directives are handled: first, a clause appearing on an end-directive is
checked to be allowed to appear on an end-directive, then all clauses
from the begin- and the end-directives are tested together. This unifies
checks for uniqueness of clauses that can appear in both places.
DeltaFile
+183-91flang/lib/Semantics/check-omp-structure.cpp
+12-6flang/lib/Semantics/check-omp-structure.h
+10-7flang/test/Semantics/OpenMP/clause-validity01.f90
+10-0llvm/include/llvm/Frontend/OpenMP/OMP.h
+1-1flang/test/Semantics/OpenMP/device-constructs.f90
+1-1flang/test/Semantics/OpenMP/declarative-directive01.f90
+217-1064 files not shown
+221-10910 files

LLVM/project 935c997clang-tools-extra/test/clang-doc enum.cpp templates.cpp, clang-tools-extra/test/clang-doc/html enum.cpp

[clang-doc] Try to make testing more uniform

Today clang-doc has tests for its various backends that use the same
input files, and mix the checks for each format. This leads to very
large test files that are quite hard to update or maintain. Thus far
we've assumed that this is better than updating several files, but as we
leverage mustache and JSON more and more to test feature completeness,
much of the output complexity is now limited to each backend and its
mustache templates. To make this simpler to maintain, we can lean into
common test Inputs keeping the annotate source separate from the test
checks, and split the checks out into their own directory hierarchy.
This patch is mostly mechanical rewriting of code. This was done with
the assistance of an LLM, but was checked by me, and verified with
instrumentation based coverage that we did not lose any line coverage.
DeltaFile
+0-839clang-tools-extra/test/clang-doc/enum.cpp
+0-491clang-tools-extra/test/clang-doc/templates.cpp
+0-380clang-tools-extra/test/clang-doc/namespace.cpp
+377-0clang-tools-extra/test/clang-doc/json/enum.cpp
+368-0clang-tools-extra/test/clang-doc/html/enum.cpp
+196-0clang-tools-extra/test/clang-doc/json/templates.cpp
+941-1,710101 files not shown
+2,737-2,812107 files

LLVM/project 7f0fad6llvm/test/CodeGen/AMDGPU llvm.amdgcn.unreachable.ll llc-pipeline-npm.ll

AMDGPU: Avoid default subtarget in hand-written codegen tests (6/9) (#205789)

Introduce -mcpu arguments in tests which didn't require check line
updates.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+4-4llvm/test/CodeGen/AMDGPU/llvm.amdgcn.unreachable.ll
+3-3llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+3-3llvm/test/CodeGen/AMDGPU/indirect-private-64.ll
+2-2llvm/test/CodeGen/AMDGPU/llvm.dbg.value.ll
+2-2llvm/test/CodeGen/AMDGPU/lower-range-metadata-intrinsic-call.ll
+2-2llvm/test/CodeGen/AMDGPU/implicit-def-muse.ll
+16-1694 files not shown
+116-116100 files

LLVM/project de3787ellvm/test/CodeGen/AMDGPU call-graph-register-usage.ll debug_frame.ll

AMDGPU: Avoid default subtarget in hand-written codegen tests (5/9) (#205788)

Introduce -mcpu arguments in tests that did not need check line updates.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+6-6llvm/test/CodeGen/AMDGPU/call-graph-register-usage.ll
+4-4llvm/test/CodeGen/AMDGPU/debug_frame.ll
+3-3llvm/test/CodeGen/AMDGPU/eh_frame.ll
+3-3llvm/test/CodeGen/AMDGPU/amdgpu-function-calls-option.ll
+3-3llvm/test/CodeGen/AMDGPU/elf.ll
+3-3llvm/test/CodeGen/AMDGPU/force-alwaysinline-lds-global-address-codegen.ll
+22-2294 files not shown
+137-137100 files

LLVM/project 749abf0clang/lib/Format UnwrappedLineParser.cpp TokenAnnotator.cpp, clang/unittests/Format TokenAnnotatorTest.cpp

[clang-format] annotate inline assembly parens (#201703)

Annotate the opening and closing parens of inline assembly. This will
make other improvements related to inline assembly easier.
DeltaFile
+37-6clang/lib/Format/UnwrappedLineParser.cpp
+22-0clang/unittests/Format/TokenAnnotatorTest.cpp
+2-0clang/lib/Format/TokenAnnotator.cpp
+1-0clang/lib/Format/FormatToken.h
+62-64 files

LLVM/project fc171eallvm/docs GettingInvolved.md

[GettingInvolved] Add wg-hlsl to online sync ups (#205891)

This has been on the community calendar for a very long time, but
apparently we never added it here.
DeltaFile
+4-0llvm/docs/GettingInvolved.md
+4-01 files

LLVM/project 2727c4cflang/lib/Semantics resolve-names.cpp check-omp-structure.cpp, flang/test/Semantics/OpenMP critical-reserved-name.f90 reserved-locator.f90

[flang][OpenMP] Properly resolve CRITICAL construct names

Resolve the names of CRITICAL constructs even if they are reserved names.

Fixes https://github.com/llvm/llvm-project/issues/205855
DeltaFile
+31-21flang/lib/Semantics/resolve-names.cpp
+8-0flang/test/Semantics/OpenMP/critical-reserved-name.f90
+6-1flang/lib/Semantics/check-omp-structure.cpp
+1-1flang/test/Semantics/OpenMP/reserved-locator.f90
+46-234 files

LLVM/project 62ba9baclang/unittests/Index IndexTests.cpp

Update clang/unittests/Index/IndexTests.cpp

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+1-1clang/unittests/Index/IndexTests.cpp
+1-11 files

LLVM/project f2459f9llvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/VPlan/AArch64 vplan-memory-op-decisions.ll

[VPlan] Handle loads feeding memops in makeMemOpWideningDecisions (NFC) (#196842)

The legacy cost model force-scalarizes loads feeding memory ops, unless
the target prefers vector addressing. Add the logic to
makeMemOpWideningDecisions. Currently this should match the legacy
decision as-is. Should be test-able in VPlan-printing test if legacy
decisions are done in a separate sub-pass as
https://github.com/llvm/llvm-project/pull/182593

PR: https://github.com/llvm/llvm-project/pull/196842
DeltaFile
+30-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+9-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+7-2llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+8-0llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+3-3llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-memory-op-decisions.ll
+3-1llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+60-96 files

LLVM/project 0a00381llvm/test/Analysis/MemorySSA invariant-load-intrinsic.ll, llvm/test/Transforms/GVN invariant-load-intrinsic.ll

[llvm][NFC] Add invariant.load intrinsic precommit tests (#205894)

Add tests to show what does/doesn't currently happen to !invariant.load
on intrinsics that read memory.

AI disclosure: Codex wrote these. They got put into new files in many cases and I _think_ that's a reasonable call.

Co-authored-by: Codex <codex at openai.com>
DeltaFile
+114-0llvm/test/Transforms/GVN/invariant-load-intrinsic.ll
+86-0llvm/test/Transforms/InstCombine/invariant-load-like-sink.ll
+76-0llvm/test/Analysis/MemorySSA/invariant-load-intrinsic.ll
+67-0llvm/test/Transforms/Sink/invariant-load.ll
+343-04 files

LLVM/project f0fd1eelldb/include/lldb/Utility FileSpec.h

[lldb][NFC] Correct documentation for FileSpec::GetFileNameExtension (#205871)
DeltaFile
+2-2lldb/include/lldb/Utility/FileSpec.h
+2-21 files

LLVM/project 0b328bcflang-rt/lib/runtime __cuda_device.f90 cuda_runtime_api.f90

[Flang-RT] Make __cuda_builtins dependency explicit (#205895)

When compiling CUDA-Fortran, a use of the module __cuda_builtins is
added implicitly by the compiler. Add explicit use so CMake can consider
it in the built order. The other modules that are compiled with CUDA
enabled (`cudadevice.f90` and `cooperativegroups.f90`) transitively
depend on depend on __cuda_builtins as well.
DeltaFile
+1-0flang-rt/lib/runtime/__cuda_device.f90
+1-0flang-rt/lib/runtime/cuda_runtime_api.f90
+2-02 files

LLVM/project 23e9604libcxx/include/__memory shared_ptr.h, libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create make_shared.pass.cpp

[libc++] Fix move-only types in std::make_shared (#205819)

https://github.com/llvm/llvm-project/pull/200401 broke `make_shared` and
friends support for move-only types.
DeltaFile
+6-0libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
+1-1libcxx/include/__memory/shared_ptr.h
+7-12 files

LLVM/project 3b5c4aellvm/lib/Target/DirectX DXILDataScalarization.cpp, llvm/test/CodeGen/DirectX scalarize-dynamic-vector-index.ll

[DirectX] Widen i1 indexable temps to i32 in DXILDataScalarization (#205444)

fixes #205443

Dynamically-indexed <N x i1> vectors were lowered to alloca [N x i1]
indexable temps. DXIL booleans are 32-bit in memory, and i1 stack arrays
are mishandled downstream (e.g. WARP returns 1 for every
    dynamically-indexed element), producing wrong results for dynamic
bool vector/matrix accesses.

Widen i1 indexable-temp arrays to [N x i32], zero-extending on store and
truncating back to i1 on load, matching DXC. Fixes the dynamic bool
extract/insert miscompile.

We make this change in DXILDataScalarization because this is the pass
that adds the i1 allocas which was the cause of our miscompile.

Assisted by Claude Opus 4.7
DeltaFile
+79-0llvm/test/CodeGen/DirectX/scalarize-dynamic-vector-index.ll
+36-4llvm/lib/Target/DirectX/DXILDataScalarization.cpp
+115-42 files

LLVM/project 8af6c29mlir/include/mlir/Dialect/OpenACC OpenACCUtils.h OpenACCTypeInterfaces.td, mlir/lib/Dialect/OpenACC/Transforms ACCRecipeMaterialization.cpp

[OpenACC] Propagate variable names to ops after materializing recipes. (#205821)

ACCRecipeMaterialization only attaches names to the result of the recipe
being materialized. However, some recipes produce multiple ops that need
to carry the variable name.

This change introduces `acc::getVarNamePlaceholder()`, a placeholder
value for `acc.var_name`. Implementations can attach this placeholder
while building the recipe to any ops that should carry the variable
name. ACCRecipeMaterialization will then replace the placeholder with
the actual variable name while materializing the recipe.

Assisted-by: Claude Code
DeltaFile
+52-0mlir/test/Dialect/OpenACC/acc-recipe-materialization-firstprivate-two-allocs.mlir
+20-0mlir/lib/Dialect/OpenACC/Transforms/ACCRecipeMaterialization.cpp
+10-0mlir/include/mlir/Dialect/OpenACC/OpenACCUtils.h
+6-0mlir/include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td
+4-0mlir/lib/Dialect/OpenACC/Utils/OpenACCUtils.cpp
+92-05 files