LLVM/project 7d16aaf — llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 aarch64-reassociate-accumulators.ll

[AArch64] Fix accumulator chain opcode for SABAv2i32 (#226062)

A typo in `AArch64InstrInfo::getAccumulationStartOpcode` caused
`SABAv2i32` to be matched instead of `SABDv2i32`.

Fixes #225984
DeltaFile
+35-0llvm/test/CodeGen/AArch64/aarch64-reassociate-accumulators.ll
+1-1llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+36-12 files

LLVM/project d869b10 — llvm/include/llvm/MC MCSectionGOFF.h, llvm/lib/CodeGen TargetLoweringObjectFileImpl.cpp

[SystemZ] Fix zero length PR section for zero size BSS globals (#225863)

PR sections must have a non zero length. This was already handled for
ADA sections via requiresNonZeroLength(), but not for BSS globals
declared with zero size. This change extends the existing inflation to
also cover BSS PR sections.

---------

Co-authored-by: Yusra Syeda <yusra.syeda at ibm.com>
DeltaFile
+9-5llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+3-2llvm/include/llvm/MC/MCSectionGOFF.h
+12-72 files

LLVM/project 0d8a4a6 — llvm/lib/CodeGen SpillPlacement.cpp, llvm/test/CodeGen/AMDGPU wave-profile-spill.mir

[CodeGen] Use validated wave counts for AMDGPU spill costs

Lane-based block frequencies can understate the cost of a spill in
divergent GPU code: a wave still executes a block with only some lanes
active. Use measured block-wave counts to weight SpillPlacement's costs
relative to the original entry-wave count.

Opt in on AMDGPU only. Accept a measured count only when its IR block
maps uniquely to a machine block with matching predecessors and
successors. Keep the existing MBFI cost for unmeasured or rejected
blocks, and leave branch probabilities and general BFI unchanged.


DeltaFile
+251-0llvm/test/CodeGen/AMDGPU/wave-profile-spill.mir
+97-1llvm/lib/CodeGen/SpillPlacement.cpp
+348-12 files

LLVM/project fd893a5 — llvm/lib/Transforms/Utils LowerSwitch.cpp, llvm/test/Transforms/LowerSwitch wave-profile.ll profile-weights.ll

[Transforms] Preserve wave profiles across CFG rewrites

HIP device PGO attaches measured wave counts to IR blocks. Later CFG
rewrites can drop counts from unchanged blocks or leave stale counts
on blocks that now execute differently. Either case makes the profile
unreliable for later optimizations.

Preserve counts through switch lowering, structurization, and loop
rotation only when a block still represents the same executions. Keep
unaffected counts and their IDs even when a loop header's count must be
invalidated. Transfer branch hints only for equivalent decisions, and
avoid assigning switch weights when default traffic cannot be traced
to one edge.



DeltaFile
+157-0llvm/test/Transforms/LowerSwitch/profile-weights.ll
+113-10llvm/lib/Transforms/Utils/LowerSwitch.cpp
+68-0llvm/unittests/Transforms/Utils/LoopRotationUtilsTest.cpp
+56-0llvm/test/Transforms/LowerSwitch/wave-profile.ll
+53-0llvm/test/Transforms/StructurizeCFG/wave-profile-loop-prefix.ll
+50-0llvm/test/Transforms/StructurizeCFG/wave-profile.ll
+497-108 files not shown
+629-5114 files

LLVM/project 4ebb19e — llvm/test/tools/yaml2obj help.test, llvm/tools/yaml2obj CMakeLists.txt Opts.td

[yaml2obj] Migrate to OptTable (#224964)

yaml2obj is one of three tools that parse with
cl::ParseCommandLineOptions(LongOptionsUseDoubleDash=true). Parse its
options with an OptTable instead, so that the mode can be removed from
cl::. Spellings follow the other migrated tools: -D<macro>=<v> and
-D <macro>=<v>, -o<file> and -o <file>, --docnum=<n> and --docnum <n>,
--max-size likewise, -E, -h/--help and --version. `-o=<file>` is no
longer accepted; the tests that used it are updated. `--help` lists
only yaml2obj's options.

LLM-aided
DeltaFile
+63-34llvm/tools/yaml2obj/yaml2obj.cpp
+18-0llvm/tools/yaml2obj/Opts.td
+11-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+3-6llvm/test/tools/yaml2obj/help.test
+9-0llvm/utils/gn/secondary/llvm/tools/yaml2obj/BUILD.gn
+7-0llvm/tools/yaml2obj/CMakeLists.txt
+111-401 files not shown
+112-417 files

LLVM/project 08ee0ef — lldb/source/Plugins/ObjectContainer/Clang-Offload-Bundle CMakeLists.txt ObjectContainerClangOffloadBundle.h, lldb/source/Symbol ObjectFile.cpp

[lldb] Add plugin for Clang offload bundle object container (#222362)

## Summary

Clang supports embedding binaries using the clang offload bundler:

https://clang.llvm.org/docs/ClangOffloadBundler.html

This patch creates an ObjectContainer plug-in that allows us to get the
contained binaries within any executable.

### why we need this? 
AMD/HIP host binaries may contain a .hip_fatbin section holding a Clang
offload bundle with one or more AMDGPU ELF code objects, typically for
different GPU architectures. Each ELF code object can contain multiple
ml kernels.


### Test 

    [11 lines not shown]
DeltaFile
+350-0lldb/unittests/ObjectContainer/ObjectContainerClangOffloadBundleTest.cpp
+261-0lldb/source/Plugins/ObjectContainer/Clang-Offload-Bundle/ObjectContainerClangOffloadBundle.cpp
+76-0lldb/source/Plugins/ObjectContainer/Clang-Offload-Bundle/ObjectContainerClangOffloadBundle.h
+14-7lldb/source/Symbol/ObjectFile.cpp
+13-0lldb/source/Plugins/ObjectContainer/Clang-Offload-Bundle/CMakeLists.txt
+3-0lldb/unittests/ObjectContainer/CMakeLists.txt
+717-71 files not shown
+718-77 files

LLVM/project f4758bd — clang/include/clang/Basic Builtins.td

Remove the comment on the InterlockedCompareExchangeFloatBitwise builtin
DeltaFile
+0-1clang/include/clang/Basic/Builtins.td
+0-11 files

LLVM/project c78cc96 — clang/test/CodeGenHLSL/builtins RWTexture-Interlocked.hlsl

Add InterlockedCompareExchangeFloatBitwise coverage to the texture test
DeltaFile
+5-0clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
+5-01 files

LLVM/project 1d97e2d — clang/test/CodeGenHLSL/builtins RWBuffer-Interlocked.hlsl RasterizerOrderedByteAddressBuffer-InterlockedCompareExchangeFloatBitwise.hlsl, clang/test/SemaHLSL/BuiltIns ByteAddressBuffer-InterlockedCompareExchangeFloatBitwise-sm60.hlsl InterlockedCompareExchangeFloatBitwise-errors.hlsl

First attempt implementing InterlockedCompareExchangeFloatBitwise



DeltaFile
+119-0clang/test/SemaHLSL/BuiltIns/InterlockedCompareExchangeFloatBitwise-errors.hlsl
+43-0clang/test/CodeGenHLSL/builtins/InterlockedCompareExchangeFloatBitwise.hlsl
+42-0clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedCompareExchangeFloatBitwise-sm60.hlsl
+32-0clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedCompareExchangeFloatBitwise.hlsl
+25-0clang/test/CodeGenHLSL/builtins/RasterizerOrderedByteAddressBuffer-InterlockedCompareExchangeFloatBitwise.hlsl
+10-0clang/test/CodeGenHLSL/builtins/RWBuffer-Interlocked.hlsl
+271-05 files not shown
+298-311 files

LLVM/project d867fcd — clang/include/clang/Basic Builtins.td

Remove the comment on the InterlockedCompareStoreFloatBitwise builtin
DeltaFile
+0-1clang/include/clang/Basic/Builtins.td
+0-11 files

LLVM/project 388c74f — clang/lib/Sema SemaHLSL.cpp, clang/test/CodeGenHLSL/builtins RWByteAddressBuffer-InterlockedCompareStoreFloatBitwise.hlsl InterlockedCompareStoreFloatBitwise.hlsl

First attempt implementing InterlockedCompareStoreFloatBitwise



DeltaFile
+100-0clang/test/SemaHLSL/BuiltIns/InterlockedCompareStoreFloatBitwise-errors.hlsl
+39-0clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedCompareStoreFloatBitwise-sm60.hlsl
+35-0clang/test/CodeGenHLSL/builtins/InterlockedCompareStoreFloatBitwise.hlsl
+30-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareStoreFloat.ll
+27-0clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedCompareStoreFloatBitwise.hlsl
+16-6clang/lib/Sema/SemaHLSL.cpp
+247-66 files not shown
+311-1012 files

LLVM/project d5d162e — clang/test/CodeGenHLSL/builtins RWTexture-Interlocked.hlsl

Add InterlockedCompareStoreFloatBitwise coverage to the texture test
DeltaFile
+7-0clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
+7-01 files

LLVM/project 98c2d11 — clang/lib/Sema HLSLExternalSemaSource.cpp SemaHLSL.cpp, clang/test/CodeGenHLSL/builtins RasterizerOrderedByteAddressBuffer-InterlockedCompareExchange.hlsl RWByteAddressBuffer-InterlockedCompareExchange.hlsl

First attempt implementing InterlockedCompareExchange



DeltaFile
+93-81clang/lib/Sema/SemaHLSL.cpp
+113-0clang/test/SemaHLSL/BuiltIns/InterlockedCompareExchange-errors.hlsl
+70-0clang/test/CodeGenHLSL/builtins/InterlockedCompareExchange.hlsl
+41-24clang/lib/Sema/HLSLExternalSemaSource.cpp
+44-0clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedCompareExchange.hlsl
+35-0clang/test/CodeGenHLSL/builtins/RasterizerOrderedByteAddressBuffer-InterlockedCompareExchange.hlsl
+396-1056 files not shown
+480-12212 files

LLVM/project ece29f8 — clang/include/clang/Basic Builtins.td

Remove the comment on the InterlockedCompareStore builtin
DeltaFile
+0-1clang/include/clang/Basic/Builtins.td
+0-11 files

LLVM/project a407c31 — clang/test/CodeGenHLSL/builtins RWTexture-Interlocked.hlsl

Add InterlockedCompareExchange coverage to the texture test
DeltaFile
+5-0clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
+5-01 files

LLVM/project 239d19b — clang/include/clang/Basic Builtins.td

Remove the comment on the InterlockedCompareExchange builtin
DeltaFile
+0-1clang/include/clang/Basic/Builtins.td
+0-11 files

LLVM/project 19ac771 — clang/lib/CodeGen CGHLSLBuiltins.cpp, clang/lib/Sema HLSLExternalSemaSource.cpp

First attempt implementing InterlockedCompareStore
DeltaFile
+88-0clang/test/SemaHLSL/BuiltIns/InterlockedCompareStore-errors.hlsl
+54-0clang/test/CodeGenHLSL/builtins/InterlockedCompareStore.hlsl
+44-8clang/lib/Sema/HLSLExternalSemaSource.cpp
+29-7clang/lib/CodeGen/CGHLSLBuiltins.cpp
+36-0clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedCompareStore.hlsl
+33-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareStore.ll
+284-157 files not shown
+392-1713 files

LLVM/project 67df361 — clang/include/clang/Basic Builtins.td, clang/lib/Sema HLSLBuiltinTypeDeclBuilder.cpp

Remove comments on the float InterlockedExchange declarations
DeltaFile
+0-3clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+0-1clang/include/clang/Basic/Builtins.td
+0-42 files

LLVM/project 9b8a410 — llvm/lib/Target/DirectX DXILLegalizePass.cpp, llvm/test/CodeGen/DirectX LegalizeAtomicExchangeFloat.ll LegalizeAtomicExchangeFloat-unsupported-width.ll

address Kaitlin, reject float atomic exchange of unsupported width
DeltaFile
+30-0llvm/test/CodeGen/DirectX/LegalizeAtomicExchangeFloat-unsupported-width.ll
+12-0llvm/test/CodeGen/DirectX/LegalizeAtomicExchangeFloat.ll
+9-1llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+51-13 files

LLVM/project 2504392 — llvm/lib/Target/DirectX DXILResourceAccess.cpp, llvm/test/CodeGen/DirectX ResourceAtomicBinOp-texture-nonscalar.ll ResourceAtomicExchangeFloat.ll

Lower atomicrmw on scalar float texture resources
DeltaFile
+18-0llvm/test/CodeGen/DirectX/ResourceAtomicExchangeFloat.ll
+4-4llvm/test/CodeGen/DirectX/ResourceAtomicBinOp-texture-nonscalar.ll
+5-2llvm/lib/Target/DirectX/DXILResourceAccess.cpp
+27-63 files

LLVM/project ad0b0c7 — clang/test/CodeGenHLSL/builtins RWTexture-Interlocked.hlsl

Add InterlockedCompareStore coverage to the texture test
DeltaFile
+13-8clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
+13-81 files

LLVM/project 05aa108 — llvm/test/CodeGen/DirectX LegalizeAtomicExchangeFloat-unsupported-width.ll

add new line
DeltaFile
+1-1llvm/test/CodeGen/DirectX/LegalizeAtomicExchangeFloat-unsupported-width.ll
+1-11 files

LLVM/project 4ce35c9 — clang/test/SemaHLSL/BuiltIns InterlockedExchange-errors.hlsl ByteAddressBuffer-InterlockedExchangeFloat-sm60.hlsl, llvm/lib/Target/DirectX DXILResourceAccess.cpp DXILLegalizePass.cpp

First attempt implementing float InterlockedExchange
DeltaFile
+40-0clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedExchangeFloat-sm60.hlsl
+39-0llvm/test/CodeGen/DirectX/LegalizeAtomicExchangeFloat.ll
+38-0llvm/test/CodeGen/DirectX/ResourceAtomicExchangeFloat.ll
+21-14clang/test/SemaHLSL/BuiltIns/InterlockedExchange-errors.hlsl
+29-0llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+17-3llvm/lib/Target/DirectX/DXILResourceAccess.cpp
+184-178 files not shown
+246-2814 files

LLVM/project 564af72 — clang/test/CodeGenHLSL/builtins RWTexture-Interlocked.hlsl

Add float InterlockedExchange coverage to the texture test
DeltaFile
+7-1clang/test/CodeGenHLSL/builtins/RWTexture-Interlocked.hlsl
+7-11 files

LLVM/project dd17367 — clang/lib/Basic/Targets PPC.cpp, clang/lib/CodeGen CodeGenFunction.cpp

[FMV][AIX] Implement target_clones part 2 (target-features) (#206786)

This is part 2 (of 2) of FMV on AIX that would allow specifying
target-feature strings on the ``target_clones`` attribute. Part 1 was in
#177428.

The list of attributes supported is a subset of the attribute accepted
on the `target` attribute on AIX, specifically those that are runtime
detectable via the `__builtin_cpu_supports` builtin.

---------

Co-authored-by: Wael Yehia <wyehia at ca.ibm.com>
DeltaFile
+101-0clang/test/CodeGen/PowerPC/attr-target-clones.c
+96-0clang/test/Sema/PowerPC/attr-target-clones.c
+66-0llvm/include/llvm/TargetParser/PPCTargetParser.def
+53-7clang/lib/Basic/Targets/PPC.cpp
+47-11clang/lib/CodeGen/CodeGenFunction.cpp
+27-3clang/lib/Sema/SemaPPC.cpp
+390-218 files not shown
+441-2614 files

LLVM/project 2ed7faf — llvm/lib/Target/DirectX DXILOpLowering.cpp DXILResourceAccess.cpp, llvm/test/CodeGen/DirectX ResourceAtomicCompareExchange-texture-unsupported-kind.ll ResourceAtomicCompareExchange.ll

[DirectX] Support `cmpxchg` on buffer resources in DXIL lowering (#222162)

This PR is a backend change alone. It teaches DXIL lowering to handle a
`cmpxchg` on a buffer resource pointer, which the
`InterlockedCompareStore`
and `InterlockedCompareExchange` PRs above it in this stack need.

The PR adds:

- the `llvm.dx.resource.atomic.compare.exchange` intrinsic,
- its DXIL operation and op lowering,
- the `DXILResourceAccess` handling that turns a `cmpxchg` on a value
  returned by `llvm.dx.resource.getpointer` into that intrinsic.

DXIL has no atomic compare exchange for texture resources, so the pass
reports an error for them. A test covers that path.

There is no Clang change here, and no HLSL function becomes available.

Assisted by: Github Copilot
DeltaFile
+151-30llvm/lib/Target/DirectX/DXILResourceAccess.cpp
+82-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture.ll
+69-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture-nonscalar.ll
+53-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange.ll
+41-0llvm/lib/Target/DirectX/DXILOpLowering.cpp
+36-0llvm/test/CodeGen/DirectX/ResourceAtomicCompareExchange-texture-unsupported-kind.ll
+432-304 files not shown
+509-3210 files

LLVM/project 62fd85f — clang/test/CodeGenHLSL/builtins RasterizerOrderedByteAddressBuffer-InterlockedExchange.hlsl RWByteAddressBuffer-InterlockedExchange.hlsl, clang/test/SemaHLSL/BuiltIns ByteAddressBuffer-InterlockedExchange-sm65-errors.hlsl ByteAddressBuffer-InterlockedExchange-errors.hlsl

[HLSL] Add `InterlockedExchange` function and resource methods (#222161)

This PR adds the `InterlockedExchange` standalone function and resource
methods. The operation lowers to `atomicrmw xchg`.

`InterlockedExchange` is the first interlocked operation that reports
the
previous value. It takes that value through an `original_value`
reference
parameter, so this PR adds a `RequiresOriginalValue` flag to
`HLSLBuiltinTypeDeclBuilder` and a matching overload shape to
`HLSLExternalSemaSource`. The later compare operations reuse both.

The float overload of `InterlockedExchange` follows in a separate PR in
this
stack. This PR covers the integer overloads alone, so it links
https://github.com/llvm/llvm-project/issues/99129 without closing it.

Assisted by: Github Copilot
DeltaFile
+107-0clang/test/SemaHLSL/BuiltIns/InterlockedExchange-errors.hlsl
+44-0clang/test/CodeGenHLSL/builtins/InterlockedExchange.hlsl
+41-0clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedExchange-errors.hlsl
+40-0clang/test/CodeGenHLSL/builtins/RWByteAddressBuffer-InterlockedExchange.hlsl
+27-0clang/test/CodeGenHLSL/builtins/RasterizerOrderedByteAddressBuffer-InterlockedExchange.hlsl
+26-0clang/test/SemaHLSL/BuiltIns/ByteAddressBuffer-InterlockedExchange-sm65-errors.hlsl
+285-014 files not shown
+365-3620 files

LLVM/project 7215a8a — llvm/test/CodeGen/AArch64/GlobalISel legalize-sinh.mir legalize-sin.mir

AArch64: Mark the LR def of GlobalISel calls dead

In SelectionDAG InstrEmitter would have marked this dead.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+22-22llvm/test/CodeGen/AArch64/GlobalISel/legalize-pow.mir
+21-21llvm/test/CodeGen/AArch64/GlobalISel/legalize-sinh.mir
+21-21llvm/test/CodeGen/AArch64/GlobalISel/legalize-sin.mir
+21-21llvm/test/CodeGen/AArch64/GlobalISel/legalize-fexp2.mir
+21-21llvm/test/CodeGen/AArch64/GlobalISel/legalize-exp.mir
+21-21llvm/test/CodeGen/AArch64/GlobalISel/legalize-atan2.mir
+127-12738 files not shown
+264-26044 files

LLVM/project 6ca0abd — clang-tools-extra/docs conf.py, clang/docs conf.py

[docs] Require MyST for Sphinx documentation builds (#223829)

Fedora plans to use the separate llvm_man_pages package that we build as part of our release process now:

https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840/37

I'm assuming that other distributions are either going to be able to
install the necessary Python modules that we depend on (myst_parser
etc), or will use this man page package if they need it. Therefore, I think we
can remove this enum and associated complexity.

Assisted-by: codex
DeltaFile
+4-25utils/docs/llvm_sphinx/__init__.py
+10-0llvm/docs/ReleaseNotes.md
+1-1libc/docs/conf.py
+1-1clang/docs/conf.py
+1-1clang/docs/analyzer/conf.py
+1-1clang-tools-extra/docs/conf.py
+18-295 files not shown
+23-3411 files

LLVM/project 606e2ac — mlir/include/mlir/Dialect/Bufferization/Transforms OneShotAnalysis.h, mlir/lib/Dialect/Bufferization/Transforms OneShotAnalysis.cpp

[mlir][bufferization] Relax happens-before analysis (#223777)

On unstructured control-flow, the one-shot analysis is rather
conservative in regards to computing RaW conflicts, requiring strict
dominance which may not always be satisfied.

Relax this requirement to allow more cases to not be marked as
conflicting. Notably, readers/writers within a region that contains a
"diamond" or multiple loops are now handled.

This is a simpler version of
https://github.com/llvm/llvm-project/pull/223006 without the CFGLoopInfo
analysis, meaning it is a bit more conservative when analyzing regions
with nested loops.
DeltaFile
+714-0mlir/test/Dialect/ControlFlow/one-shot-bufferize-analysis.mlir
+276-40mlir/lib/Dialect/Bufferization/Transforms/OneShotAnalysis.cpp
+40-1mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h
+1,030-413 files