LLVM/project 3b57d53llvm/include/llvm/Support GenericLoopInfoImpl.h GenericDomTree.h, llvm/unittests/IR DominatorTreeTest.cpp

[LoopInfo] Reuse DomTree's own DFS numbering in analyze() (#207650)

analyze() discovers loop headers with a post_order(DomRoot) walk, then
tests each back-edge candidate with DomTree.dominates(). Initial queries
use `dominatedBySlowTreeWalk` and then switch to `updateDFSNumbers`
(Euler tour technique), requiring two tree walks in total.

Optimize this with an upfront updateDFSNumbers to avoid the post-order
walk. Both post-order and reverse pre-order satisfy the
child-before-parent (bottom-up) property. This does change the order in
which siblings are visited (reverse preorder visits the last child
first; post-order visits it last), but that has no observable effect:
the sub-loop and block vectors are only populated by the separate
PopulateLoopsDFS traversal afterward, not by discovery order.

`post_order` (and `depth_first`) are also inefficient for tree
traversals:
DomTreeNodeBase doesn't expose graph numbers, so they fall back to
tracking visited nodes in a SmallPtrSet. For a tree this bookkeeping is

    [5 lines not shown]
DeltaFile
+11-11llvm/unittests/IR/DominatorTreeTest.cpp
+11-4llvm/include/llvm/Support/GenericLoopInfoImpl.h
+12-2llvm/include/llvm/Support/GenericDomTree.h
+2-2llvm/include/llvm/Support/GenericDomTreeConstruction.h
+36-194 files

LLVM/project d930a16offload/unittests/OffloadAPI/program olCreateProgram.cpp

[Offload] run clang-format on olCreateProgram unit tests (#207757)

Follow-up to: https://github.com/llvm/llvm-project/pull/206462
DeltaFile
+2-1offload/unittests/OffloadAPI/program/olCreateProgram.cpp
+2-11 files

LLVM/project cfb2940libc/test/src/math sqrtf128_test.cpp

test
DeltaFile
+26-26libc/test/src/math/sqrtf128_test.cpp
+26-261 files

LLVM/project 0cb5782llvm/docs AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst

[docs][AMDGPU] Correct spelling of DW_AT_LLVM_memory_space (#207745)
DeltaFile
+2-2llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst
+2-21 files

LLVM/project 9a8a2c0flang/lib/Lower/OpenMP OpenMP.cpp, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[flang][OpenMP] Lower target in_reduction for host fallback

Enable host-fallback lowering for target in_reduction in Flang and MLIR OpenMP translation.

Model target in_reduction through the matching map entry, force address-preserving implicit mapping for Flang in_reduction list items, and emit the host-side task-reduction lookup with __kmpc_task_reduction_get_th_data. The runtime entry point takes and returns a generic, default-address-space pointer, so normalize a non-default-address-space captured pointer to the generic address space before the call and cast the returned private pointer back to the map block argument's address space, mirroring the in_reduction handling on omp.taskloop. Unsupported device/offload-entry and richer reduction forms remain diagnosed.

Add Flang lowering, MLIR verifier/translation, and LLVM IR tests for the supported host-fallback path, including a non-default-address-space case, and the remaining unsupported cases.
DeltaFile
+147-14mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+134-21mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+107-0mlir/test/Target/LLVMIR/openmp-target-in-reduction.mlir
+88-15flang/lib/Lower/OpenMP/OpenMP.cpp
+88-3mlir/test/Target/LLVMIR/openmp-todo.mlir
+85-0mlir/test/Dialect/OpenMP/invalid.mlir
+649-5314 files not shown
+1,061-8020 files

LLVM/project 4323e5cllvm/runtimes CMakeLists.txt

switch to offload-arch
DeltaFile
+4-6llvm/runtimes/CMakeLists.txt
+4-61 files

LLVM/project 3ed7f90libcxx/include/__ranges elements_view.h, libcxx/test/libcxx/ranges/range.adaptors/range.elements nodiscard.verify.cpp

[libc++][ranges] Applied [[nodiscard]] to `elements_view` (#206589)

[[nodiscard]] should be applied to functions where discarding the return
value is most likely a correctness issue.

- https://libcxx.llvm.org/CodingGuidelines.html
- https://wg21.link/range.elements

Towards https://github.com/llvm/llvm-project/issues/172124

---------

Co-authored-by: A. Jiang <de34 at live.cn>
DeltaFile
+116-0libcxx/test/libcxx/ranges/range.adaptors/range.elements/nodiscard.verify.cpp
+21-20libcxx/include/__ranges/elements_view.h
+137-202 files

LLVM/project 5ade959llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp

[AMDGPU] Unroll illegal vector TRUNCATE after legalization

`performShlCombine` introduced a `v2i32 truncate x:v2i64`. This
pattern is not legal, and is normally expanded by the legalizer.

However, since the combine is done after legalization the illegal
pattern remains.

This happens on gfx1251 since it has legal `shl v2i64` instructions.
DeltaFile
+8-0llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+8-01 files

LLVM/project b8c1776clang/include/clang/Basic BuiltinsX86.td, clang/lib/AST ExprConstant.cpp

[Clang] Add constant evaluation support for x86 psadbw (#169253)

This patch adds constant evaluation support for the  x86 PSADBW and PSADBW128 intrinsics in Clang’s constexpr interpreter.
DeltaFile
+44-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+32-0clang/lib/AST/ExprConstant.cpp
+19-1clang/test/CodeGen/X86/avx512bw-builtins.c
+5-12clang/include/clang/Basic/BuiltinsX86.td
+4-5clang/lib/Headers/xmmintrin.h
+9-0clang/test/CodeGen/X86/avx2-builtins.c
+113-186 files not shown
+132-3112 files

LLVM/project 8990c02llvm/test/CodeGen/AMDGPU packed_shl64_combine.ll

[AMDGPU] Pre-commit test
DeltaFile
+117-0llvm/test/CodeGen/AMDGPU/packed_shl64_combine.ll
+117-01 files

LLVM/project 3950502clang/docs ClangLinkerWrapper.rst, clang/test/OffloadTools/clang-linker-wrapper linker-wrapper-verbose.c

[ClangLinkerWrapper] Use discrete steps in verbose mode (#204186)

Summary:
One persistent problem with the linker wrapper flow is that it was more
difficult to reuse as a script than the previous flow. This is because
it did a lot of work internally. In the past we moved al ot of this into
dedicated LLVM tools, so now it's possible to simply use these tools
instead.

This PR changes the verbose mode handling to defer steps to tools rather
than doing it internally. This allows users to use verbose printing and
can copy/paste the results to re-run the steps.
DeltaFile
+194-9clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+94-0clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper-verbose.c
+30-21clang/docs/ClangLinkerWrapper.rst
+318-303 files

LLVM/project 6575e39lld/ELF InputFiles.cpp InputFiles.h

[ELF] Reuse SHT_GROUP selection verdicts in initializeSections. NFC (#207437)

For each SHT_GROUP section, the parallel initializeSections re-derives
what the serial parse() already decided
(https://reviews.llvm.org/D130810).

Record the kept group section indices during parse() so that we can save
the work (xxh3 string hash and DenseMap lookup) in the parallel
initializeSections().

In a clang-relassert --threads=8 benchmark, "Initialize sections"
decreases from 39.0 to 30.6.
DeltaFile
+10-8lld/ELF/InputFiles.cpp
+4-0lld/ELF/InputFiles.h
+14-82 files

LLVM/project 343197eclang/test/CIR/CodeGen inline-asm.c, clang/test/CIR/Lowering module-asm.cir

[CIR] Fix lit tests after explicit target feature for module asm (#207741)

- Fix lit tests after the module-level inline assembly is enhanced to
support specifying target features explicitly in
fcfc9167b628a2fae8fe1d662989ff7752d905ad.
DeltaFile
+4-3clang/test/CIR/CodeGen/inline-asm.c
+3-2clang/test/CIR/Lowering/module-asm.cir
+7-52 files

LLVM/project 10c05feflang/lib/Optimizer/Transforms FIRToMemRef.cpp, flang/test/Transforms/FIRToMemRef emboxed-slice-rank-reduction.mlir emboxed-slice-stride.mlir

[FIRToMemRef] Fix wrong-code for array_coor over sliced fir.embox

FIRToMemRef::convertArrayCoorOp routes through getMemrefIndices, which
only folds the first `rank` triples of sliceInfo.sliceVec into the memref
indices (i.e. the array_coor's own slice); the embox's slice triples --
which sit at [rank*3 .. 2*rank*3-1] when both are present -- were dropped.
Three consequences, three fixes here:

  1. Non-collapsed embox slice lbs contribute (lb - 1) per Fortran dim to
     each memref index. Fold them in in memref order (reversed Fortran
     order) so the reinterpret_cast view lands at the right column.

  2. The shapeVec-else stride path used shapeVec[0..rank-1] to build the
     outer strides. With both slices present, that's the box's (slice's)
     extents. Use shapeVec[rank..2*rank-1] instead -- the parent's extents
     -- so the outer stride is the parent's leading dim rather than the
     slice's own size.

  3. Rank-reducing embox slices (undef ub/step triples) have no memref

    [5 lines not shown]
DeltaFile
+148-2flang/lib/Optimizer/Transforms/FIRToMemRef.cpp
+82-0flang/test/Transforms/FIRToMemRef/emboxed-slice-rank-reduction.mlir
+67-0flang/test/Transforms/FIRToMemRef/emboxed-slice-stride.mlir
+65-0flang/test/Transforms/FIRToMemRef/emboxed-slice-array-coor.mlir
+362-24 files

LLVM/project 2638040llvm/lib/Target/AMDGPU AMDGPULowerKernelArguments.cpp, llvm/test/CodeGen/AMDGPU lower-kernargs.ll

[AMDGPU] Copy the nofpclass attribute onto a matching kernarg load (#207734)

Follow up for https://github.com/llvm/llvm-project/pull/207655
DeltaFile
+76-32llvm/test/CodeGen/AMDGPU/lower-kernargs.ll
+8-0llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
+84-322 files

LLVM/project 8b50847clang/include/clang/AST StmtVisitor.h

[clang][AST] Inline StmtVisitor fallback methods (#203125)

Mark the trivial `StmtVisitorBase` fallback methods `always_inline` so
each `VisitFoo`-to-`VisitParent` delegation is folded into its caller
instead of retained as an out-of-line template thunk.

In matched Release assertions-off Darwin arm64 builds, stripped clang
decreased by 266,656 bytes, stripped clangd decreased by 232,912 bytes,
and the stripped upstream `llvm-driver` multicall decreased by 266,336
bytes.

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.

Co-authored-by: OpenAI Codex <noreply at openai.com>
DeltaFile
+20-12clang/include/clang/AST/StmtVisitor.h
+20-121 files

LLVM/project 1ac400eclang/lib/Frontend CompilerInvocation.cpp

[clang][Frontend] Batch LangOptions context hashing (#203162)

`CompilerInvocation::computeContextHash` currently expands 269
non-benign `LangOptions` into individual `HashBuilder::add` calls. This
collects the values in an `unsigned` array and passes the array to
`HashBuilder::addRangeElements`, which preserves the ordered
native-endian bytes without adding an element count.

In a Release arm64 build, clangd decreases by 16,528 bytes unstripped
and 16,544 bytes stripped.

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+13-6clang/lib/Frontend/CompilerInvocation.cpp
+13-61 files

LLVM/project 0d87d24llvm/lib/IR Type.cpp

IR: Use switch in getFloatingPointType
DeltaFile
+17-17llvm/lib/IR/Type.cpp
+17-171 files

LLVM/project 2c7d18coffload/unittests/OffloadAPI/program olCreateProgram.cpp

[offload] add unit tests for olCreateProgram (#206462)

Add tests for olCreateProgram param validation & fail on invalid program
DeltaFile
+54-1offload/unittests/OffloadAPI/program/olCreateProgram.cpp
+54-11 files

LLVM/project 4e3bb3fclang/lib/CodeGen CodeGenTypes.cpp

clang: Use getFloatingPointType instead of reinventing it

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+6-25clang/lib/CodeGen/CodeGenTypes.cpp
+6-251 files

LLVM/project bd8db3aclang/lib/CodeGen CGExprScalar.cpp CodeGenTypes.cpp, clang/lib/CodeGen/TargetBuiltins NVPTX.cpp

clang: Remove useFP16ConversionIntrinsics target option

Follow up to #174494. Remove the remnants of the control to
use llvm.convert.to.fp16/llvm.convert.from.fp16. Prefer
directly using the IR half type, unless the value is used
in an ABI context where it needs to remain as i16.

I did the first 80% of this a long time ago, and AI finished
the last bit and handled the recent rebases and test updates.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+30-47clang/test/CodeGen/wasm-fp16.c
+70-0clang/test/CIR/CodeGen/fp16.c
+16-38clang/lib/CodeGen/CGExprScalar.cpp
+44-0clang/test/CIR/CodeGen/fp16-native-args.c
+10-18clang/lib/CodeGen/CodeGenTypes.cpp
+2-20clang/lib/CodeGen/TargetBuiltins/NVPTX.cpp
+172-12320 files not shown
+193-23226 files

LLVM/project 267de15clang/cmake/modules ClangConfig.cmake.in, cmake/Modules GetTripleCMakeSystemName.cmake NormalizeTriple.cmake

Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133)

This reverts commit 08c728e8528c9584bc1fe0f46bbdd657e368be91.

Reapply after runtimes build fixes on platforms without shared libraries.
DeltaFile
+89-0cmake/Modules/GetTripleCMakeSystemName.cmake
+32-37llvm/cmake/modules/LLVMConfig.cmake.in
+49-15llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+36-0cmake/Modules/NormalizeTriple.cmake
+2-16runtimes/CMakeLists.txt
+4-1clang/cmake/modules/ClangConfig.cmake.in
+212-691 files not shown
+212-737 files

LLVM/project eded35clibc/test/src/math SqrtTest.h

nit
DeltaFile
+1-1libc/test/src/math/SqrtTest.h
+1-11 files

LLVM/project 750f3bfllvm/include/llvm/CodeGen RDFGraph.h, llvm/lib/Target/Hexagon HexagonPostRAHandleQFP.cpp

[Hexagon] Add XQFloat post-RA compliance checker (#207082)

Introduce XqfPostRADiagnosis to verify qf use-def correctness after
register allocation. Acts as a diagnostic/debugger for XQFloat
implementation. Off by default, enabled with -enable-postra-xqf-check.

Co-authored-by: Santanu Das <quic_santdas at quicinc.com>
DeltaFile
+164-74llvm/lib/Target/Hexagon/HexagonPostRAHandleQFP.cpp
+133-0llvm/test/CodeGen/Hexagon/autohvx/xqf-multi-conv.ll
+60-0llvm/test/CodeGen/Hexagon/autohvx/xqf-postra-warnings.ll
+45-0llvm/test/CodeGen/Hexagon/autohvx/xqf-postra-subreg3.ll
+1-1llvm/test/CodeGen/Hexagon/autohvx/xqf-postra-conv-double2.ll
+2-0llvm/include/llvm/CodeGen/RDFGraph.h
+405-752 files not shown
+407-778 files

LLVM/project b048b26libc/test/src/math/smoke sqrtf128_test.cpp

nit
DeltaFile
+1-1libc/test/src/math/smoke/sqrtf128_test.cpp
+1-11 files

LLVM/project 6d284ccopenmp/runtime/cmake arm64x.cmake, openmp/runtime/src CMakeLists.txt

[openmp][arm64ec] Fix arm64x when PER_TARGET_RUNTIME_DIR=On

This patch fixes an issue where the combination of LIBOMP_ENABLE_ARM64X and
LLVM_PER_TARGET_RUNTIME_DIR=On led to only the arm64 library being
installed. With this fix, the arm64ec and arm64 .lib files are both
installed, and the arm64x dll is the one installed to the binary dir.
DeltaFile
+4-1openmp/runtime/src/CMakeLists.txt
+1-1openmp/runtime/cmake/arm64x.cmake
+5-22 files

LLVM/project ff1fe38llvm/lib/Transforms/IPO ThinLTOBitcodeWriter.cpp LowerTypeTests.cpp, llvm/test/ThinLTO/X86 devirt_function_alias2.ll

[CFI] Create an external linkage alias instead of promoting internals
DeltaFile
+19-33llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+35-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+29-0llvm/test/Transforms/LowerTypeTests/promoted-internal.ll
+20-5llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+10-7llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll
+6-4llvm/test/ThinLTO/X86/devirt_function_alias2.ll
+119-494 files not shown
+130-5710 files

LLVM/project e432443llvm/include/llvm/IR GlobalValue.h, llvm/include/llvm/Transforms/Utils AssignGUID.h

Reland #184065
DeltaFile
+61-17llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+45-30llvm/lib/LTO/LTO.cpp
+64-2llvm/lib/IR/Globals.cpp
+49-3llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+45-5llvm/include/llvm/IR/GlobalValue.h
+49-0llvm/include/llvm/Transforms/Utils/AssignGUID.h
+313-57120 files not shown
+872-416126 files

LLVM/project 7323632llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp SystemZHLASMAsmStreamer.h

Fix formatting
DeltaFile
+5-5llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+1-1llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+6-62 files

LLVM/project da99141llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp SystemZHLASMAsmStreamer.h

[SystemZ][z/OS] Show instruction encoding in HLASM output

This change adds the support to show instruction encoding as a comment
when emitting HLASM text. With this, the last 2 LIT tests migrate to
HLASM syntax.
DeltaFile
+100-1llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+4-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+104-12 files