LLVM/project ae3d310clang-tools-extra/clangd SemanticHighlighting.cpp, clang-tools-extra/clangd/unittests SemanticHighlightingTests.cpp

[clangd] Null-check AutoTypeLoc in CollectExtraHighlightings::VisitDeclaratorDecl (#207323)

A Decl's getType() can have a getContainedAutoType() without
its TypeSourceInfo's type having one, because the two types
can differ in type sugar such as DecltypeType which
getContainedAutoType[Loc]() deliberately does not look through.

Fixes https://github.com/llvm/llvm-project/issues/207139
DeltaFile
+8-3clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
+4-2clang-tools-extra/clangd/SemanticHighlighting.cpp
+12-52 files

LLVM/project 8cc99f7llvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Rewrite BanerjeeMIV test with safe APInt interval arithmetic

The old banerjeeMIVtest computed inequality bounds using SCEV
arithmetic on 64-bit integers. Intermediate operations like
$(A^{-} - B^{+}) \times Iterations$ could overflow i64 even when all individual
coefficients and loop bounds fit, producing unsound results.

Replace the symbolic bound machinery with a self-contained APInt
interval arithmetic implementation. Key design decisions:

- BanerjeeInterval holds [Lower, Upper] signed-inclusive bounds.
  Operations use APInt arithmetic at WideBits, chosen to guarantee no
  intermediate overflow:
  $$
    WideBits = max(8, 2 \times BaseBits + MaxLevels + 8)
  $$
  This is provably sufficient, each term product needs at most `2 \times BaseBits + 1`
  bits, and summing across MaxLevels terms needs at most ceil($\log_2 (MaxLevels)$)
  extra bits.

    [15 lines not shown]
DeltaFile
+381-466llvm/lib/Analysis/DependenceAnalysis.cpp
+0-73llvm/include/llvm/Analysis/DependenceAnalysis.h
+55-0llvm/test/Analysis/DependenceAnalysis/banerjee-overflow.ll
+2-4llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+1-1llvm/test/Analysis/DependenceAnalysis/PR51512.ll
+439-5445 files

LLVM/project f44ec21clang/lib/AST/ByteCode Interp.h Interp.cpp

[clang][bytecode][NFC] Move float->ap cast ops to the source file (#207592)

And deduplicate the code.
DeltaFile
+4-44clang/lib/AST/ByteCode/Interp.h
+33-0clang/lib/AST/ByteCode/Interp.cpp
+37-442 files

LLVM/project a280b1bclang/include/clang/Basic DiagnosticDriverKinds.td, clang/include/clang/Options Options.td

[Hexagon] Allow reservation of caller saved registers via -ffixed-rXX (#205733)

Previously, hexagon allowed only callee saved registers to be reserved
since reserving caller saved regs can create problems, since it cannot
be sure that the callee (from a different module) also reserves the
register.

The responsibility of reserving register and managing it is now on the
user. However, a warning will be displayed if the user tries to reserve a
caller saved register.

---------

Co-authored-by: quic-santdas <quic_santdas at qti.qualcomm.com>
DeltaFile
+49-2clang/test/Driver/hexagon-toolchain-elf.c
+32-16clang/lib/Driver/ToolChains/Hexagon.cpp
+7-4clang/include/clang/Options/Options.td
+6-0llvm/test/CodeGen/Hexagon/reserved-regs.ll
+5-0clang/include/clang/Basic/DiagnosticDriverKinds.td
+2-0llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp
+101-221 files not shown
+102-237 files

LLVM/project 0ac6b4bclang/lib/AST/ByteCode Compiler.cpp

[clang][bytecode][NFC] Remove unnecessary loop variable (#207649)

No reason to have the extra `N`.
DeltaFile
+1-1clang/lib/AST/ByteCode/Compiler.cpp
+1-11 files

LLVM/project aae9f9eclang/lib/AST/ByteCode Compiler.cpp Compiler.h

[clang][bytecode][NFC] Move Scope classes to source file (#207647)
DeltaFile
+234-0clang/lib/AST/ByteCode/Compiler.cpp
+0-234clang/lib/AST/ByteCode/Compiler.h
+234-2342 files

LLVM/project a929f64llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp AMDGPUAsmPrinter.h, llvm/test/CodeGen/AMDGPU llc-pipeline-npm.ll

[AMDGPU][NPM] Complete AsmPrinter support (#203509)
DeltaFile
+45-4llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+22-0llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
+15-3llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+10-1llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+92-84 files

LLVM/project 467390ellvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine vec_demanded_elts.ll

[InstCombine] Skip redundant demanded element queries in insert chains (#205948)

Avoid re-running `SimplifyDemandedVectorElts` on intermediate
`insertelement` chain nodes when a bounded scan proves the top-level
all-lanes query cannot change the IR.

The skip is implemented inside the `InsertElement` case of
`SimplifyDemandedVectorElts` and is limited to the top-level all-lanes
query (`Depth == 0 && DemandedElts.isAllOnes()`). The bounded scan
matches the existing SDVE depth window and only skips chains with
distinct in-range constant insert indices. This keeps the normal SDVE
path for duplicate indices, variable indices, out-of-range indices,
multi-use chains, and the final chain root.

This was motivated by a cutile matmul compile-time case where loop
unrolling produced 128-lane vector insert/extract chains. Before this
change, InstCombine repeatedly invoked SDVE on intermediate
`insertelement` nodes in those chains. On the representative IR, the
affected InstCombine pass time went from about `44.9 ms` to `29.8 ms`,

    [4 lines not shown]
DeltaFile
+94-0llvm/test/Transforms/InstCombine/vec_demanded_elts.ll
+60-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+154-02 files

LLVM/project 45574a5llvm/lib/Target/RISCV RISCVSubtarget.cpp, llvm/test/Analysis/CostModel/RISCV fixed-vector-scatter.ll fixed-vector-gather.ll

[RISCV] Remove -riscv-v-fixed-length-vector-lmul-max option (#207312)

Whilst reviewing https://github.com/llvm/llvm-project/pull/207254, I
threw claude at it and it found a crash when passing in a non-default
-riscv-v-fixed-length-vector-lmul-max flag.

This option was added 5 years ago around the time initial fixed vector
support was being added in a719b667a9794, and IIUC it was added so that
support for more LMULs could be added over time.

We don't have any substantial codegen testing for it and I couldn't find
any downstream users either. So rather than trying to fix
https://github.com/llvm/llvm-project/pull/207254 to handle it it seems
easier just to remove it now that fixed vector support for RVV has
matured.
DeltaFile
+93-37llvm/test/CodeGen/RISCV/rvv/fixed-vectors-lmul-max.ll
+24-24llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll
+24-24llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll
+24-23llvm/test/CodeGen/RISCV/rvv/pr52475.ll
+6-6llvm/test/Analysis/CostModel/RISCV/rvv-select.ll
+1-10llvm/lib/Target/RISCV/RISCVSubtarget.cpp
+172-1241 files not shown
+173-1257 files

LLVM/project 4eb56cfllvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/GVN/PRE pre-load-through-select.ll

[InstSimplify] Fold value-preserving zext/sext of trunc (#204089)

Fold a value-preserving `zext (trunc nuw X)` / `sext (trunc nsw X)` back
to
`X` in `simplifyCastInst` (when the trunc source type equals the extend
result type and the no-wrap flag guarantees the round-trip is identity).

After indvars canonicalizes a min-index loop, the running-index select
has a
`trunc nuw nsw i64 %iv to i32` on its true side while `arr[i]` is
addressed
directly with the i64 `%iv`. When PHI-translating the select-dependent
address along the backedge (see #203863), the true side becomes
`gep base, zext nneg (trunc nuw %iv)`, which has no matching instruction
in
the loop, so the select dependency is never formed and the redundant
load
survives.


    [11 lines not shown]
DeltaFile
+72-0llvm/test/Transforms/GVN/PRE/pre-load-through-select.ll
+66-0llvm/test/Transforms/InstSimplify/cast.ll
+11-0llvm/lib/Analysis/InstructionSimplify.cpp
+149-03 files

LLVM/project 4d7b4fd.github/workflows test-suite.yml

[GitHub] Build llvm-size for test-suite.yml workflow (#207642)

This is also needed by llvm-test-suite
DeltaFile
+1-1.github/workflows/test-suite.yml
+1-11 files

LLVM/project d5288e7llvm/lib/Target/BPF BPFCodeGenPassBuilder.cpp BPFTargetMachine.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+123-0llvm/lib/Target/BPF/BPFCodeGenPassBuilder.cpp
+2-38llvm/lib/Target/BPF/BPFTargetMachine.cpp
+7-0llvm/lib/Target/BPF/BPF.h
+6-0llvm/lib/Target/BPF/BPFTargetMachine.h
+6-0llvm/lib/Target/BPF/BPFPassRegistry.def
+3-0llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
+147-381 files not shown
+150-387 files

LLVM/project 4536fa6llvm/lib/Target/BPF BPF.h BPFPassRegistry.def

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+7-0llvm/lib/Target/BPF/BPF.h
+6-0llvm/lib/Target/BPF/BPFPassRegistry.def
+3-0llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
+16-03 files

LLVM/project b2cb2ebllvm/lib/Target/BPF BPF.h BPFPassRegistry.def

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+7-0llvm/lib/Target/BPF/BPF.h
+6-0llvm/lib/Target/BPF/BPFPassRegistry.def
+3-0llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
+16-03 files

LLVM/project 774f8a0libc/src/complex/generic cabsf.cpp cabs.cpp, libc/test/src/complex CAbsTest.h cabsf_test.cpp

[libc][complex] Enable cabs and cabsf in libc (#206677)

This PR adds basic implementation for cabs and cabsf in LLVM libc and
also extend current MPC infrastructure to support cabs operation.

---------

Signed-off-by: jinge90 <ge.jin at intel.com>
DeltaFile
+119-0libc/test/src/complex/CAbsTest.h
+37-0libc/test/src/complex/cabsf_test.cpp
+36-0libc/test/src/complex/cabs_test.cpp
+28-0libc/src/complex/generic/cabsf.cpp
+28-0libc/src/complex/generic/cabs.cpp
+28-0libc/src/complex/generic/CMakeLists.txt
+276-015 files not shown
+399-121 files

LLVM/project f7d7502lldb/source/Plugins/ObjectFile/ELF ObjectFileELF.cpp, llvm/include/llvm/BinaryFormat DynamicTags.def

[SPARC] Make SPARC_REGISTER Sparc specific in llvm-readobj and LLDB (#206316)

The commit 4418a8e5 failed to limit SPARC_REGISTER to Sparc targets
only, which causes conflict when adding new dynamic tags for other
targets.
DeltaFile
+12-0lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+12-0llvm/lib/Object/ELF.cpp
+4-0llvm/include/llvm/BinaryFormat/DynamicTags.def
+28-03 files

LLVM/project 311c3cellvm/include/llvm InitializePasses.h, llvm/include/llvm/CodeGen StaticDataAnnotator.h Passes.h

[NewPM] Port StaticDataAnnotator

Standard NewPM pass porting. The PassBuilder wireup/test coverage will
come in the next PR.

Reviewers: arsenm, teresajohnson, mingmingl-llvm

Pull Request: https://github.com/llvm/llvm-project/pull/207629
DeltaFile
+29-16llvm/lib/CodeGen/StaticDataAnnotator.cpp
+25-0llvm/include/llvm/CodeGen/StaticDataAnnotator.h
+1-1llvm/include/llvm/CodeGen/Passes.h
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+1-1llvm/include/llvm/InitializePasses.h
+1-1llvm/lib/CodeGen/CodeGen.cpp
+58-203 files not shown
+60-219 files

LLVM/project 17ccf17clang/test/CodeGen/RISCV rvp-intrinsics.c, cross-project-tests/intrinsic-header-tests riscv_packed_simd.c

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+271-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+159-90libcxx/include/set
+244-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+207-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+146-0llvm/docs/AMDGPUDMAOperations.md
+109-0llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+1,136-9074 files not shown
+2,145-48480 files

LLVM/project dc56f71llvm/include/llvm InitializePasses.h, llvm/include/llvm/CodeGen StaticDataSplitter.h Passes.h

[NewPM] Port StaticDataSplitter

Standard pass porting. Remove the MBPI member given it was unused.

Reviewers: arsenm, teresajohnson, mingmingl-llvm

Pull Request: https://github.com/llvm/llvm-project/pull/207627
DeltaFile
+68-27llvm/lib/CodeGen/StaticDataSplitter.cpp
+28-0llvm/include/llvm/CodeGen/StaticDataSplitter.h
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+1-1llvm/include/llvm/CodeGen/Passes.h
+1-1llvm/include/llvm/InitializePasses.h
+1-1llvm/include/llvm/Passes/MachinePassRegistry.def
+100-312 files not shown
+102-328 files

LLVM/project 224b9d2libcxx/include set, libcxx/test/std/containers/associative/multiset iterator.pass.cpp merge.pass.cpp

[libc++] Make `<set>` `std::multiset` constexpr as part of P3372R3 (#206257)
DeltaFile
+159-90libcxx/include/set
+20-15libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp
+21-13libcxx/test/std/containers/associative/multiset/iterator.pass.cpp
+22-11libcxx/test/std/containers/associative/multiset/merge.pass.cpp
+18-6libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp
+17-5libcxx/test/std/containers/associative/multiset/count_transparent.pass.cpp
+257-14057 files not shown
+841-30163 files

LLVM/project 9b2d44allvm/include/llvm/ObjectYAML ContiguousBlobAccumulator.h, llvm/lib/ObjectYAML ELFEmitter.cpp ContiguousBlobAccumulator.cpp

[ObjectYAML][NFC] Hoist ContiguousBlobAccumulator into a shared header (#207306)

Move ContiguousBlobAccumulator out of ELFEmitter.cpp's anonymous
namespace so other yaml2obj emitters can reuse it.
DeltaFile
+2-103llvm/lib/ObjectYAML/ELFEmitter.cpp
+98-0llvm/include/llvm/ObjectYAML/ContiguousBlobAccumulator.h
+69-0llvm/lib/ObjectYAML/ContiguousBlobAccumulator.cpp
+1-0llvm/lib/ObjectYAML/CMakeLists.txt
+170-1034 files

LLVM/project 4a62c05lld/ELF AMDGPUObjectLinking.cpp, lld/test/ELF amdgpu-lds-link-time-ordering-multigroup.s amdgpu-lds-link-time-random-layout.s

[RFC][AMDGPU][lld] Add object linking support

Add AMDGPU ELF object-linking support in lld, including resource propagation,
LDS layout, indirect-call handling, named-barrier updates, target compatibility
checks, and kernel descriptor/metadata patching.

This is a large PR because the linker needs to understand and validate several
AMDGPU object-linking concepts end to end. I tried to keep the changes scoped to
the necessary linker support and related metadata plumbing, but I'm open to
suggestions on how to split or structure the review to make it easier.
DeltaFile
+1,726-0lld/ELF/AMDGPUObjectLinking.cpp
+505-0lld/test/ELF/amdgpu-lds-link-time-ordering-multigroup.s
+432-0lld/test/ELF/amdgpu-lds-link-time-random-layout.s
+425-0lld/test/ELF/amdgpu-lds-link-time-grouped.s
+402-0lld/test/ELF/amdgpu-lds-link-time-ordering-complex.s
+400-0lld/test/ELF/amdgpu-resource-usage.s
+3,890-045 files not shown
+10,087-451 files

LLVM/project 760f940llvm/docs AMDGPUUsage.rst, llvm/include/llvm/Support AMDGPUObjLinkingInfo.h

[AMDGPU] Add FUNC_WAVE32 for object linking info flag
DeltaFile
+17-17llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
+5-5llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+3-1llvm/include/llvm/Support/AMDGPUObjLinkingInfo.h
+4-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+1-0llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+1-0llvm/docs/AMDGPUUsage.rst
+31-232 files not shown
+33-238 files

LLVM/project 5ed0716llvm/docs AMDGPUUsage.rst, llvm/include/llvm/Support AMDGPUObjLinkingInfo.h

[AMDGPU] Add FUNC_WGP_MODE for object linking info flag
DeltaFile
+18-0llvm/test/CodeGen/AMDGPU/lds-link-time-codegen.ll
+5-5llvm/test/MC/AMDGPU/amdgpu-info-roundtrip.s
+4-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+3-1llvm/include/llvm/Support/AMDGPUObjLinkingInfo.h
+1-0llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+1-0llvm/docs/AMDGPUUsage.rst
+32-62 files not shown
+34-68 files

LLVM/project 4f844b9llvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp AMDGPUMCResourceInfo.cpp

[AMDGPU] Introduce ABI occupancy for object linking

This PR introduces ABI occupancy as the contract used to compile functions under
object linking. The default is derived from the occupancy needed for a 1024
workitem workgroup, can be overridden with `-amdgpu-abi-waves-per-eu`, and can
be overridden per function by `amdgpu-flat-work-group-size` or tightened by an
accepted `amdgpu-waves-per-eu` hint.

The backend emits the selected occupancy in `.amdgpu.info` and uses it to
enforce the object linking register budget.
DeltaFile
+67-35llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+56-7llvm/docs/AMDGPUUsage.rst
+34-3llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp
+34-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-preserves-attr.ll
+32-2llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+31-0llvm/test/CodeGen/AMDGPU/object-linking-abi-occupancy-kernel-no-attr.ll
+254-4715 files not shown
+446-4821 files

LLVM/project deecf8dllvm/docs AMDGPUDMAOperations.md AMDGPUAsyncOperations.rst

[docs][AMDGPU] move DMA operations to a separate file (#206917)

This includes the various `.async` and `.tensor` operations. Various
scattered bits of information are now in one place. Also added the
missing documentation for tensor intrinsics.
DeltaFile
+146-0llvm/docs/AMDGPUDMAOperations.md
+10-46llvm/docs/AMDGPUAsyncOperations.rst
+26-28llvm/docs/AMDGPUUsage.rst
+7-1llvm/docs/UserGuides.md
+189-754 files

LLVM/project 29fa6a8clang/lib/CodeGen/TargetBuiltins RISCV.cpp, clang/test/CodeGen/RISCV rvp-intrinsics.c

[RISCV][P-ext] Support Packed Merge. (#207110)
DeltaFile
+271-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+244-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+207-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+109-0llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+47-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+24-1clang/lib/CodeGen/TargetBuiltins/RISCV.cpp
+902-53 files not shown
+945-59 files

LLVM/project 3aea741llvm/include/llvm/CodeGen StaticDataSplitter.h StaticDataAnnotator.h, llvm/lib/CodeGen StaticDataSplitter.cpp StaticDataAnnotator.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+68-27llvm/lib/CodeGen/StaticDataSplitter.cpp
+29-16llvm/lib/CodeGen/StaticDataAnnotator.cpp
+28-0llvm/include/llvm/CodeGen/StaticDataSplitter.h
+25-0llvm/include/llvm/CodeGen/StaticDataAnnotator.h
+2-2llvm/lib/CodeGen/TargetPassConfig.cpp
+2-2llvm/include/llvm/CodeGen/Passes.h
+154-475 files not shown
+162-5311 files

LLVM/project 32b0279llvm/include/llvm/CodeGen StaticDataSplitter.h Passes.h, llvm/include/llvm/Passes MachinePassRegistry.def

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+68-27llvm/lib/CodeGen/StaticDataSplitter.cpp
+28-0llvm/include/llvm/CodeGen/StaticDataSplitter.h
+1-1llvm/lib/CodeGen/CodeGen.cpp
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+1-1llvm/include/llvm/Passes/MachinePassRegistry.def
+1-1llvm/include/llvm/CodeGen/Passes.h
+100-312 files not shown
+102-328 files

LLVM/project 3ad2a76llvm/include/llvm InitializePasses.h, llvm/include/llvm/CodeGen StaticDataSplitter.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+68-27llvm/lib/CodeGen/StaticDataSplitter.cpp
+28-0llvm/include/llvm/CodeGen/StaticDataSplitter.h
+1-1llvm/lib/CodeGen/TargetPassConfig.cpp
+1-1llvm/lib/CodeGen/CodeGen.cpp
+1-1llvm/include/llvm/Passes/MachinePassRegistry.def
+1-1llvm/include/llvm/InitializePasses.h
+100-312 files not shown
+102-328 files