LLVM/project 24b9655llvm/include/llvm/MC MCStreamer.h MCLFIRewriter.h, llvm/include/llvm/MC/MCParser MCAsmParserExtension.h

[NFC][LFI] Reduce includes due to c-t impact (#182617)

Removes header includes that don't need to be made at the top-level by
moving transitive dependencies directly into source files and using
forward declarations. Biggest impact is that we no longer include
`MCLFIRewriter.h` in `MCStreamer.h` and `MCAsmParserExtension.h`.
DeltaFile
+2-4llvm/include/llvm/MC/MCStreamer.h
+5-0llvm/lib/MC/MCStreamer.cpp
+3-1llvm/lib/MC/MCLFI.cpp
+1-1llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h
+1-1llvm/include/llvm/MC/MCLFIRewriter.h
+1-1llvm/lib/MC/MCLFIRewriter.cpp
+13-82 files not shown
+13-108 files

LLVM/project 7c61596clang-tools-extra/clang-tidy/misc ConstCorrectnessCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Correctly handle array of pointers in misc-const-correctness (#179059)

In arrays of pointers, `misc-const-correctness` check wrongly inspects
whether the array element type was const-qualified, rather than the type
it points to, leading to redundant `const` suggestions. This patch fixes
the problem.

Closes [#178880](https://github.com/llvm/llvm-project/issues/178880)
DeltaFile
+27-0clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-pointers.cpp
+2-3clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
+3-0clang-tools-extra/docs/ReleaseNotes.rst
+32-33 files

LLVM/project af9ca0eflang/lib/Optimizer/Builder CUDAIntrinsicCall.cpp, flang/module cuda_runtime_api.f90

Revert "[flang][cuda] Add entry points for cudastreamsynchronize (#181932)" (#182657)

This is causing some testing issue. Reverting for now.
DeltaFile
+0-11flang/test/Lower/CUDA/cuda-default-stream.cuf
+0-10flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp
+0-10flang/module/cuda_runtime_api.f90
+0-313 files

LLVM/project 0ef4b21clang/docs CMakeLists.txt index.rst, clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td

[Clang][AMDGPU][Docs] Add builtin documentation for AMDGPU builtins

Use the documentation generation infrastructure to document the AMDGPU builtins.
This PR starts with the ABI / Special Register builtins. Documentation for the
remaining builtin categories will be added incrementally in follow-up patches.
DeltaFile
+268-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+100-27clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-0clang/docs/CMakeLists.txt
+1-0clang/docs/index.rst
+370-274 files

LLVM/project 1aaa338clang/include/clang/Basic BuiltinsBase.td, clang/test/TableGen builtin-docs.td

[Clang][TableGen] Add documentation generation infrastructure for builtins (#181573)

Add a `-gen-builtin-docs` TableGen backend that generates RST
documentation from builtin definitions, modeled after the existing
attribute documentation system (`-gen-attr-docs`).

The emitter generates per-builtin RST sections grouped by category,
including
prototype rendering with optional named parameters (via `ArgNames`),
target
feature annotations, and documentation content. A mismatch between
`ArgNames`
count and prototype parameter count is a fatal error.
DeltaFile
+265-0clang/test/TableGen/builtin-docs.td
+183-0clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+50-0clang/include/clang/Basic/BuiltinsBase.td
+6-0clang/utils/TableGen/TableGen.cpp
+2-0clang/utils/TableGen/TableGenBackends.h
+506-05 files

LLVM/project 17ad555clang/docs ReleaseNotes.rst, clang/include/clang/Sema Sema.h

[Clang] Added clang diagnostic when snprintf/vsnprintf uses sizeof(dest) for the len parameter

Closes: [#162366](https://github.com/llvm/llvm-project/issues/162366)

---------

Co-authored-by: Bogdan Zunic <bzunic at cisco.com>
DeltaFile
+71-56clang/lib/Sema/SemaChecking.cpp
+116-0clang/test/SemaCXX/warn-memset-bad-sizeof.cpp
+3-0clang/docs/ReleaseNotes.rst
+2-0clang/include/clang/Sema/Sema.h
+192-564 files

LLVM/project d710b1cclang/docs CMakeLists.txt index.rst, clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td

[Clang][AMDGPU][Docs] Add builtin documentation for AMDGPU builtins

Use the documentation generation infrastructure to document the AMDGPU builtins.
This PR starts with the ABI / Special Register builtins. Documentation for the
remaining builtin categories will be added incrementally in follow-up patches.
DeltaFile
+291-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+114-30clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-0clang/docs/CMakeLists.txt
+1-0clang/docs/index.rst
+407-304 files

LLVM/project 802e1afclang/utils/TableGen ClangBuiltinsEmitter.cpp

review comments
DeltaFile
+18-22clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+18-221 files

LLVM/project e85b10bclang/include/clang/Basic BuiltinsBase.td, clang/test/TableGen builtin-docs.td

[Clang][TableGen] Add documentation generation infrastructure for builtins

Add a `-gen-builtin-docs` TableGen backend that generates RST
documentation from builtin definitions, modeled after the existing
attribute documentation system (`-gen-attr-docs`).

The emitter generates per-builtin RST sections grouped by category, including
prototype rendering with optional named parameters (via `ArgNames`), target
feature annotations, and documentation content. A mismatch between `ArgNames`
count and prototype parameter count is a fatal error.
DeltaFile
+265-0clang/test/TableGen/builtin-docs.td
+187-0clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+50-0clang/include/clang/Basic/BuiltinsBase.td
+6-0clang/utils/TableGen/TableGen.cpp
+2-0clang/utils/TableGen/TableGenBackends.h
+510-05 files

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