LLVM/project 6e179bbllvm/lib/Target/AMDGPU AMDGPURegBankCombiner.cpp

Fix formatting
DeltaFile
+1-2llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+1-21 files

LLVM/project f5cd21ellvm/test/CodeGen/AMDGPU llvm.is.fpclass.ll llvm.is.fpclass.f16.ll, llvm/test/CodeGen/AMDGPU/GlobalISel regbankcombiner-copy-scc-vcc.mir inst-select-copy-scc-vcc.ll

Remove wip_match_opcode, add TODO for regression
DeltaFile
+83-175llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.ll
+115-116llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-copy-scc-vcc.mir
+36-81llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.f16.ll
+14-16llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll
+9-9llvm/test/CodeGen/AMDGPU/fminimum.ll
+9-9llvm/test/CodeGen/AMDGPU/fmaximum.ll
+266-4065 files not shown
+284-42311 files

LLVM/project bf83bbfllvm/include/llvm/CodeGen SlotIndexes.h

[SlotIndexes] Make IndexListEntry/slot constructor private

This was made public only for some unit tests introduced in
e5e3dccd0741c2cf6e1885f0b6053fcfc6684102 that have now been removed.
Since they have been removed, make the method private to prevent misuse,
remove the warning now that misuse is prevented by visibility, and
remove the description of the destructor given it is redundant with the
code.
DeltaFile
+2-5llvm/include/llvm/CodeGen/SlotIndexes.h
+2-51 files

LLVM/project 553ce3aflang-rt/include/flang-rt/runtime memory.h

[flang-rt] Temporarily disable destructor call in OwningPtr::delete_ptr. (#182635)

This is causing failures in CUF testing, because the device compiler
cannot identify the static stack size for kernels.
DeltaFile
+21-0flang-rt/include/flang-rt/runtime/memory.h
+21-01 files

LLVM/project f2eff5amlir/include/mlir/Dialect/AMDGPU/IR AMDGPUOps.td

[mlir][amdgpu] Revise AMDGPU dialect DPP documentation (#182639)

Assisted by: Claude

---------

Signed-off-by: Eric Feng <Eric.Feng at amd.com>
DeltaFile
+91-14mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPUOps.td
+91-141 files

LLVM/project a2b7f1fllvm/include/llvm/LTO LTO.h, llvm/include/llvm/Transforms/IPO MemProfContextDisambiguation.h

[ThinLTO][MemProf] Support remark emission for thin link and use in MemProf (#182570)

Enable optimization remark emission during the ThinLTO thin link phase.
This is useful for global analysis passes like MemProf context
disambiguation which operate on the summary index and may need to
report diagnostics before any IR modules are available.

Key changes:
- Create a dummy function ("thinlto_remark_dummy") in a private Module
  within the LTO class to provide the necessary Function context for
  OptimizationRemarkEmitter.
- Update MemProfContextDisambiguation to use a callback for remark
  emission, allowing it to report hinted sizes and other diagnostics
  during the thin link.
- Ensure the dummy module and function are safely cleaned up at the end
  of the LTO session via the LTO::cleanup mechanism.
DeltaFile
+24-16llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+24-1llvm/lib/LTO/LTO.cpp
+9-0llvm/include/llvm/LTO/LTO.h
+5-2llvm/test/ThinLTO/X86/memprof-basic.ll
+3-1llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h
+65-205 files

LLVM/project 594e9fbllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV condops.ll select.ll

[RISCV] Remove srl from (srl (and X, (1 << C)), C) used as czero.eqz/nez condition. (#182598)

(setne (and X, 1 << C), 0) is canonicalized to (srl (and X, (1 << C)),
C).
If this is later used as a czero.eqz/nez condition, we can remove
the srl if the and can be represented as an ANDI.
DeltaFile
+108-0llvm/test/CodeGen/RISCV/condops.ll
+55-0llvm/test/CodeGen/RISCV/select.ll
+20-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+183-33 files

LLVM/project c3ddc3fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Fix formatting

Created using spr 1.3.7
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+4-41 files

LLVM/project 3343a5bclang/lib/Frontend CompilerInvocation.cpp, clang/test/CodeGenHLSL/builtins step-overloads.hlsl

[HLSL] Enable `-Wconversion`, `-Wvector-conversion`, and `-Wmatrix-conversion` warnings for HLSL by default (#182607)

Fixes #180038 by enabling `-Wconversion`, `-Wvector-conversion`, and
`-Wmatrix-conversion` warnings for HLSL by default, both in the HLSL
clang driver and when fixing up clang invocations under HLSL in
CompilerInvocation.cpp (so that they are enabled even with clang -cc1).

This PR also updates existing tests to expect warnings that weren't
expected before, and removes the `-Wconversion` flags from existing HLSL
tests since it is now redundant due to being enabled by default.

Note that no existing HLSL tests use or exercise `-Wvector-conversion`
or `-Wmatrix-conversion`.
DeltaFile
+28-0clang/test/SemaHLSL/no-conversion-warnings.hlsl
+17-0clang/test/Driver/HLSL/conversion-warning-flags.hlsl
+12-0clang/lib/Frontend/CompilerInvocation.cpp
+0-7clang/test/Driver/HLSL/wconversion.hlsl
+3-3clang/test/SemaHLSL/SplatOverloadResolution.hlsl
+2-2clang/test/CodeGenHLSL/builtins/step-overloads.hlsl
+62-1238 files not shown
+109-5744 files

LLVM/project c9d5e47llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 tsc-s352.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+241-41llvm/test/Transforms/SLPVectorizer/X86/fmaxnum.ll
+221-41llvm/test/Transforms/SLPVectorizer/X86/fminnum.ll
+63-29llvm/test/Transforms/SLPVectorizer/X86/dot-product.ll
+60-23llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+26-24llvm/test/Transforms/SLPVectorizer/X86/phi.ll
+7-13llvm/test/Transforms/SLPVectorizer/AArch64/tsc-s352.ll
+618-1712 files not shown
+633-1858 files

LLVM/project 555cb27llvm/test/Analysis/FunctionPropertiesAnalysis properties-stats.ll, llvm/test/Other functionpropertiesanalysis.ll

Moved FunctionProperties test to correct test path (#182637)

Test was previously in Other ambiguous path. Now under its appropiate
folder
DeltaFile
+70-0llvm/test/Analysis/FunctionPropertiesAnalysis/properties-stats.ll
+0-70llvm/test/Other/functionpropertiesanalysis.ll
+70-702 files

LLVM/project d30de66clang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp

also co_yield

Created using spr 1.3.7
DeltaFile
+4-4clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+4-41 files

LLVM/project 4071c1bllvm/lib/Frontend/OpenMP OMPIRBuilder.cpp, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

Refactor buildAffinityData by hoisting the creation of affinity_list
DeltaFile
+47-54mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+2-5llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+49-592 files

LLVM/project a7cbf17clang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp

coyield

Created using spr 1.3.7
DeltaFile
+3-1clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+3-11 files

LLVM/project 40252b9mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

Extract iterator loop body convertion logic
DeltaFile
+37-27mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+37-271 files

LLVM/project ed1dba4llvm/unittests/Frontend OpenMPIRBuilderTest.cpp, mlir/test/Target/LLVMIR openmp-todo.mlir

Fix tests
DeltaFile
+0-12mlir/test/Target/LLVMIR/openmp-todo.mlir
+4-4llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+4-162 files

LLVM/project 7120032llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Move iterator loop generate logic to OMPIRBuilder
DeltaFile
+59-65mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+61-0llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+7-0llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+127-653 files

LLVM/project 69d87d3clang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp

cmt

Created using spr 1.3.7
DeltaFile
+2-2clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+2-21 files

LLVM/project 99dc561clang/test/CodeGenOpenCL builtins-amdgcn-gfx1250-tensor-load-store.cl, llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp AMDGPUISelDAGToDAG.cpp

[AMDGPU] Use a general form of intrinsic for tensor load/store (#182334)

  The intrinsic has five arguments for the tensor descriptor (D#), while the fifth one is reserved for future targets, and it will be silently ignored in codegen for gfx1250.
  For tensor up to 2D, only the first two D# groups are meaningful and the rest should be zero-initialized.
DeltaFile
+0-185llvm/test/Transforms/InstCombine/AMDGPU/tensor-load-store-lds.ll
+49-33llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tensor.load.store.ll
+38-8clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-tensor-load-store.cl
+44-0llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+3-40mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+35-0llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+169-26613 files not shown
+211-38919 files

LLVM/project c5a118bclang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp

typo

Created using spr 1.3.7
DeltaFile
+1-1clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+1-11 files

LLVM/project 689ecf8llvm/lib/Target/Hexagon HexagonTfrCleanup.cpp HexagonGenMux.cpp, llvm/test/CodeGen/Hexagon copy-phys-int-dbl.mir truncating-copy-double-to-int.ll

[Hexagon] Handle subreg copies between DoubleRegs and IntRegs (#181360)

ISel can generate truncating COPYs from DoubleRegs to IntRegs when a
64-bit result (e.g., C2_mask) is used in a 32-bit context. Several
passes crashed on this pattern:

BitTracker asserted WD >= WS for COPY instructions. Handle the WD < WS
case by extracting the low WD bits from the source.

HexagonInstrInfo::copyPhysReg had no case for IntRegs <- DoubleRegs or
DoubleRegs <- IntRegs. Add both directions, respecting the subreg index
on the operand (isub_lo/isub_hi) when present.

HexagonTfrCleanup asserted that source and destination register sizes
match. Replace with proper subreg resolution on both operands and a
hasNoVRegs() guard since the pass runs post-RA.

HexagonGenMux asserted no subregs on physical register operands.
Preserve subreg information when building mux instructions and resolve

    [6 lines not shown]
DeltaFile
+48-8llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp
+35-7llvm/lib/Target/Hexagon/HexagonGenMux.cpp
+32-0llvm/test/CodeGen/Hexagon/copy-phys-int-dbl.mir
+27-0llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
+22-0llvm/test/CodeGen/Hexagon/truncating-copy-double-to-int.ll
+20-0llvm/test/CodeGen/Hexagon/tfr-cleanup-subreg-copy.ll
+184-151 files not shown
+195-187 files

LLVM/project 9f6ad76flang-rt/lib/cuda stream.cpp

[flang][cuda] Use default stream when calling cudaStreamSynchronize without arg (#182623)

DeltaFile
+1-2flang-rt/lib/cuda/stream.cpp
+1-21 files

LLVM/project 6b44a2fclang/lib/Sema SemaHLSL.cpp, clang/test/AST/HLSL matrix-member-access-scalar.hlsl

[HLSL][Matrix] Make matrix single element accessor return a scalar instead of vector (#182609)

Fixes #182599 by making `SemaHLSL::checkMatrixComponent` return the
element type instead of a vector when the number of vector components is
exactly 1.
DeltaFile
+31-79clang/test/CodeGenHLSL/matrix-member-zero-based-accessor-scalar-store.hlsl
+31-79clang/test/CodeGenHLSL/matrix-member-one-based-accessor-scalar-store.hlsl
+32-48clang/test/CodeGenHLSL/matrix-member-one-based-accessor-scalar-load.hlsl
+32-48clang/test/CodeGenHLSL/matrix-member-zero-based-accessor-scalar-load.hlsl
+8-12clang/test/AST/HLSL/matrix-member-access-scalar.hlsl
+2-0clang/lib/Sema/SemaHLSL.cpp
+136-2666 files

LLVM/project 78b7825llvm/unittests/Frontend OpenMPIRBuilderTest.cpp, mlir/test/Target/LLVMIR openmp-todo.mlir

Fix tests
DeltaFile
+0-12mlir/test/Target/LLVMIR/openmp-todo.mlir
+4-4llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+4-162 files

LLVM/project b5fa04bclang/lib/Analysis/FlowSensitive DataflowEnvironment.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+4-1clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+4-11 files

LLVM/project 4044610llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Move iterator loop generate logic to OMPIRBuilder
DeltaFile
+59-65mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+58-0llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+8-0llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+125-653 files

LLVM/project 0f9ef9eclang-tools-extra/clang-doc MDGenerator.cpp Generators.cpp, clang-tools-extra/unittests/clang-doc GeneratorTest.cpp ClangDocTest.cpp

[clang-doc] Improve complexity of Index construction

The existing implementation ends up with an O(N^2) algorithm due to
repeated linear scans during index construction. Switching to a
StringMap allows us to reduce this to O(N), since we no longer need to
search the vector.

The `BM_Index_Insertion` benchmark measures the time taken to insert N
unique records into the index.

| Scale (N Items) | Baseline (ns) | Patched (ns) | Speedup | Change |
|----------------:|--------------:|-------------:|--------:|-------:|
| 10              | 9,977         | 11,004       | 0.91x   | +10.3% |
| 64              | 69,249        | 69,166       | 1.00x   | -0.1%  |
| 512             | 1,932,714     | 525,877      | 3.68x   | -72.8% |
| 4,096           | 92,411,535    | 4,589,030    | 20.1x   | -95.0% |
| 10,000          | 577,384,945   | 12,998,039   | 44.4x   | -97.7% |

The patch delivers significant improvements to scalability. At 10,000

    [13 lines not shown]
DeltaFile
+71-17clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp
+21-10clang-tools-extra/clang-doc/MDGenerator.cpp
+13-11clang-tools-extra/clang-doc/Generators.cpp
+11-5clang-tools-extra/clang-doc/JSONGenerator.cpp
+3-3clang-tools-extra/clang-doc/YAMLGenerator.cpp
+2-2clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+121-482 files not shown
+124-518 files

LLVM/project 8449fddclang-tools-extra/clang-doc CMakeLists.txt, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp CMakeLists.txt

[clang-doc] Add basic benchmarks for library functionality

clang-doc's performance is good, but we suspect it could be better. To
track this with more fidelity, we can add a set of GoogleBenchmarks that
exercise portions of the library. To start we try to track high level
items that we monitor via the TimeTrace functions, and give them their
own micro benchmarks. This should give us more confidence that switching
out data structures or updating algorthms will have a positive
performance impact.

Note that an LLM helped generate portions of the benchmarks and
parameterize them. Most of the internal logic was written by me, but
the LLM was used to handle boilerplate and adaptation to the harness.
DeltaFile
+214-0clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+20-0clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt
+4-0clang-tools-extra/clang-doc/CMakeLists.txt
+238-03 files

LLVM/project a412d73llvm/lib/CodeGen MachineOutliner.cpp, llvm/test/CodeGen/AArch64 machine-outliner-bundle-debuginfo.mir

[AArch64][MachineOutliner] Clear debug locations on bundled instructions (#175655)

When the machine outliner duplicates instructions, it clears their debug
locations to avoid having the outlined function reference DISubprograms
from the original functions. However, this only cleared the debug
location on the bundle header, not on the individual instructions inside
the bundle.

This caused assertion failures in `LexicalScopes::getOrCreateRegularScope`,
because the bundled instructions still had debug locations pointing to
the original function's.

Fix this by iterating through all instructions in a bundle and clearing
their debug locations as well.
DeltaFile
+113-0llvm/test/CodeGen/AArch64/machine-outliner-bundle-debuginfo.mir
+7-0llvm/lib/CodeGen/MachineOutliner.cpp
+120-02 files

LLVM/project 410c64ellvm/lib/Target/AMDGPU AMDGPULibFunc.cpp

AMDGPU: Try to fix leak in AMDGPULibFunc (#182583)

I don't know why this was trying to do placement do. I guess
this was overriding the unique_ptr, bypassing its destructor.
DeltaFile
+2-0llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
+2-01 files