LLVM/project 3449207lldb/source/Host/macosx/objcxx HostInfoMacOSX.mm

[lldb][NFC] Fix the SPI prototypes in HostInfoMacOSX.mm
to unblock a CI bot building with a different set of headers.
rdar://148939795
DeltaFile
+25-18lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+25-181 files

LLVM/project 0671f04llvm/include/llvm/Transforms/Utils MemoryTaggingSupport.h, llvm/lib/Target/AArch64 AArch64StackTagging.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+7-8llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
+2-4llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
+1-2llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+1-2llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+11-164 files

LLVM/project 1106a41mlir/include/mlir/Dialect/GPU/IR GPUOps.td, mlir/test/Dialect/GPU invalid.mlir

[mlir][GPU] Verify known_{block,grid,cluster}_size is at least 1 (#179886)

### Summary
This PR resolves https://github.com/llvm/llvm-project/issues/179604
DeltaFile
+12-1mlir/test/Dialect/GPU/invalid.mlir
+8-2mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
+20-32 files

LLVM/project fae1cc0compiler-rt/include/sanitizer ubsan_interface.h, compiler-rt/lib/ubsan ubsan_loop_detect.cpp CMakeLists.txt

ubsan: Add loop detection runtime and e2e tests for -fsanitize-trap-loop.



Reviewers: fmayer, vitalybuka

Reviewed By: vitalybuka, fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/179011
DeltaFile
+100-0compiler-rt/lib/ubsan/ubsan_loop_detect.cpp
+15-7compiler-rt/test/cfi/CMakeLists.txt
+22-0compiler-rt/include/sanitizer/ubsan_interface.h
+21-0compiler-rt/lib/ubsan/CMakeLists.txt
+21-0llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn
+12-2compiler-rt/test/cfi/lit.cfg.py
+191-94 files not shown
+200-910 files

LLVM/project a544d37clang/docs UsersManual.rst, clang/include/clang/Options Options.td

CodeGen, Driver: Add -fsanitize-trap-loop option.

This option may be used to opt into infinite loops for failed UBSan and
CFI checks. It causes Clang to generate an llvm.cond.loop intrinsic call
instead of a conditional branch to a trap instruction when generating
code for a conditional trap.

Part of this RFC:
https://discourse.llvm.org/t/rfc-optimizing-conditional-traps/89456

Reviewers: fmayer, vitalybuka

Reviewed By: vitalybuka, fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/177688
DeltaFile
+25-0clang/docs/UsersManual.rst
+20-0clang/test/CodeGenCXX/sanitize-trap-loop.cpp
+7-0clang/include/clang/Options/Options.td
+6-0clang/lib/CodeGen/CGExpr.cpp
+5-0clang/lib/Driver/SanitizerArgs.cpp
+3-0clang/test/Driver/sanitize-trap-loop.c
+66-02 files not shown
+69-08 files

LLVM/project 191af6cllvm/docs LangRef.rst, llvm/lib/CodeGen PreISelIntrinsicLowering.cpp

Add llvm.cond.loop intrinsic.

The llvm.cond.loop intrinsic is semantically equivalent to a conditional
branch conditioned on ``pred`` to a basic block consisting only of an
unconditional branch to itself. Unlike such a branch, it is guaranteed
to use specific instructions. This allows an interrupt handler or
other introspection mechanism to straightforwardly detect whether
the program is currently spinning in the infinite loop and possibly
terminate the program if so. The intent is that this intrinsic may
be used as a more efficient alternative to a conditional branch to
a call to ``llvm.trap`` in circumstances where the loop detection
is guaranteed to be present. This construct has been experimentally
determined to be executed more efficiently (when the branch is not taken)
than a conditional branch to a trap instruction on AMD and older Intel
microarchitectures, and is also more code size efficient by avoiding the
need to emit a trap instruction and possibly a long branch instruction.

On i386 and x86_64, the infinite loop is guaranteed to consist of a short
conditional branch instruction that branches to itself. Specifically,

    [9 lines not shown]
DeltaFile
+29-22llvm/lib/Target/X86/X86ISelLowering.cpp
+50-0llvm/test/CodeGen/X86/cond-loop.ll
+48-0llvm/docs/LangRef.rst
+25-0llvm/test/Transforms/PreISelIntrinsicLowering/cond-loop.ll
+17-0llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+13-0llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+182-2211 files not shown
+234-2317 files

LLVM/project 38f0947utils/bazel/llvm-project-overlay/clang/unittests BUILD.bazel

buildifier

Created using spr 1.3.7
DeltaFile
+2-2utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+2-21 files

LLVM/project 1f0710dlld/ELF OutputSections.cpp, llvm/test/tools/obj2yaml/ELF bb-addr-map-pgo-analysis-map.yaml

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+4-4llvm/test/tools/obj2yaml/ELF/bb-addr-map-pgo-analysis-map.yaml
+0-2lld/ELF/OutputSections.cpp
+1-1llvm/tools/obj2yaml/elf2yaml.cpp
+5-73 files

LLVM/project 5973dc6llvm/test/tools/obj2yaml/ELF bb-addr-map-pgo-analysis-map.yaml, llvm/tools/obj2yaml elf2yaml.cpp

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+4-4llvm/test/tools/obj2yaml/ELF/bb-addr-map-pgo-analysis-map.yaml
+1-1llvm/tools/obj2yaml/elf2yaml.cpp
+5-52 files

LLVM/project 32ab445llvm/test/tools/obj2yaml/ELF bb-addr-map-pgo-analysis-map.yaml, llvm/tools/obj2yaml elf2yaml.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+4-4llvm/test/tools/obj2yaml/ELF/bb-addr-map-pgo-analysis-map.yaml
+1-1llvm/tools/obj2yaml/elf2yaml.cpp
+5-52 files

LLVM/project 570055bmlir/lib/Dialect/XeGPU/Transforms XeGPUWgToSgDistribute.cpp, mlir/test/Dialect/XeGPU xegpu-blocking.mlir xegpu-wg-to-sg-unify-ops.mlir

[MLIR][XeGPU] Propagate layout from anchor ops before Wg To Sg & Blocking Pass (#179490)

This PR calls recoverTemporaryLayout before the XeGPUWgtoSgDistribute &
XeGPUBlocking Pass to recover all the temporary operand layout which
might be required by the transformation patterns for checks and
verification
DeltaFile
+11-70mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+38-30mlir/test/Dialect/XeGPU/xegpu-blocking.mlir
+14-25mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+11-22mlir/test/Dialect/XeGPU/xegpu-wg-to-sg.mlir
+13-20mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-elemwise.mlir
+6-6mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir
+93-1733 files not shown
+102-1819 files

LLVM/project 68a1bfautils/bazel/llvm-project-overlay/clang/unittests BUILD.bazel

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+29-0utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+29-01 files

LLVM/project 12d0672clang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms flatten-cleanup-scope-simple.cir flatten-cleanup-scope-multi-exit.cir

[CIR] Implement initial flattening of cleanup scope ops (#180063)

This implements flattening of `cir.cleanup.scope` operations that have a
single exit, and introduces checks to detect multiple exit cases and
report an error when they are encountered. At this point, only normal
cleanups are flattened. EH cleanup handling will be added in a future
change.

Substantial amounts of this PR were created using agentic AI tools, but
I have carefully reviewed the code, comments, and tests and made changes
as needed.
DeltaFile
+540-0clang/test/CIR/Transforms/flatten-cleanup-scope-simple.cir
+413-0clang/test/CIR/Transforms/flatten-cleanup-scope-multi-exit.cir
+326-4clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+59-0clang/test/CIR/Transforms/flatten-cleanup-scope-nyi.cir
+1,338-44 files

LLVM/project 66020a7clang/lib/CodeGen CGObjCMac.cpp

format
DeltaFile
+3-6clang/lib/CodeGen/CGObjCMac.cpp
+3-61 files

LLVM/project 4d6913elibcxx/include/__vector vector.h

[libcxx] Rename `__split_buffer` alias template to `_SplitBuffer` (#180284)

`-Wchanges-meaning` is a GCC warning that catches shadowing in more
contexts. While a bit annoying here, it's a helpful warning. As such, we
need to rename the `__split_buffer` alias template in `std::vector` so
that we don't trip it up.
DeltaFile
+20-23libcxx/include/__vector/vector.h
+20-231 files

LLVM/project 047db15clang/test/OpenMP task_codegen.cpp threadprivate_codegen.cpp

Revert "[Clang] Mark this pointer in destructors dead_on_return (#166276)"

This reverts commit 278fd0553ef5834e005a048a6b480631f3fc1b38.

This was causing some buildbot failures in DSE:
1. https://lab.llvm.org/buildbot/#/builders/25/builds/15425
2. https://lab.llvm.org/buildbot/#/builders/24/builds/17304
DeltaFile
+2,041-3,458clang/test/OpenMP/task_codegen.cpp
+2,140-2,140clang/test/OpenMP/threadprivate_codegen.cpp
+514-514clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
+510-510clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
+311-647clang/test/OpenMP/for_reduction_codegen.cpp
+455-455clang/test/OpenMP/single_codegen.cpp
+5,971-7,72493 files not shown
+13,769-15,65399 files

LLVM/project 3213d9dclang/include/clang/CodeGen CodeGenABITypes.h, clang/lib/CodeGen CGObjCMac.cpp

expose getObjCDirectMethodCallee for swift

Swift may need to emit calls to thunks as well. Instead
of letting swift rewrite the thunk generation logic, we
might as well expose the method.
DeltaFile
+19-0clang/lib/CodeGen/CGObjCMac.cpp
+15-0clang/include/clang/CodeGen/CodeGenABITypes.h
+34-02 files

LLVM/project 8102ebfmlir/lib/Dialect/XeGPU/Transforms XeGPULayoutImpl.cpp

[MLIR][XeGPU] Fixing PR179016 minor issues (#180295)

Fix two issues brough by PR179016: 
1. unused variable if build the option with
"DLLVM_ENABLE_ASSERTIONS=OFF"
2. Recover modification to recoverTemporaryLayouts() brought by
PR176737. Unintentionally lost during the merging process.
DeltaFile
+4-4mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp
+4-41 files

LLVM/project f7aa1cdclang/lib/Frontend FrontendAction.cpp, clang/lib/Serialization ASTWriter.cpp

[clang] Canonicalizing `-include-pch` input in the Frontend (#180065)

This patch adds logic to canonicalize `-include-pch`'s input in the
frontend. This way, the `ASTWriter` always serializes the canonicalized
path to the included pch file whether the input is an absolute path or a
relative path.

Fixes rdar://168596546.
DeltaFile
+29-0clang/test/PCH/pch-input-path-independent.c
+12-3clang/lib/Frontend/FrontendAction.cpp
+9-0clang/lib/Serialization/ASTWriter.cpp
+1-1clang/test/Modules/validate-file-content.m
+2-0clang/test/PCH/debug-info-pch-path.c
+1-1clang/test/PCH/modified-module-dependency.m
+54-51 files not shown
+55-67 files

LLVM/project 2555f3bclang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeAnnotations.h, clang/lib/Analysis/LifetimeSafety LifetimeAnnotations.cpp FactsGenerator.cpp

[LifetimeSafety] Treat std::unique_ptr::release() as a move operation (#180230)

Add support for `std::unique_ptr::release()` in lifetime analysis to
avoid false positives when ownership is manually transferred via
`release()`.

- Added a new function `isUniquePtrRelease()` to detect when
`std::unique_ptr::release()` is called
- Modified `handleInvalidatingCall()` to mark the unique_ptr as moved
when release() is called

When manually transferring ownership using `std::unique_ptr::release()`,
the lifetime analysis would previously generate false positive
use-after-free warnings. This change treats `release()` as a move
operation, correctly modeling the ownership transfer semantics and
reducing false positives in code that manually manages ownership.
DeltaFile
+18-8clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+14-1clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+12-0clang/test/Sema/warn-lifetime-safety.cpp
+5-0clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h
+1-0clang/test/Sema/Inputs/lifetime-analysis.h
+50-95 files

LLVM/project 249bf83clang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,639-1,65665 files

LLVM/project 184b51fclang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

reb

Created using spr 1.3.7
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,639-1,65665 files

LLVM/project bb1bde3clang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

reb

Created using spr 1.3.7
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,639-1,65665 files

LLVM/project 278fd05clang/test/OpenMP task_codegen.cpp threadprivate_codegen.cpp

[Clang] Mark this pointer in destructors dead_on_return (#166276)

This helps to clean up any dead stores that come up at the end of the
destructor. The motivating example was a refactoring in libc++'s
basic_string implementation in 8dae17be2991cd7f0d7fd9aa5aecd064520a14f6
that added a zeroing store into the destructor, causing a large
performance regression on an internal workload. We also saw a ~0.2%
performance increase on an internal server workload when enabling this.

I also tested this against all of the non-flaky tests in our large C++
codebase and found a minimal number of issues that all happened to be in
user code.
DeltaFile
+3,458-2,041clang/test/OpenMP/task_codegen.cpp
+2,140-2,140clang/test/OpenMP/threadprivate_codegen.cpp
+514-514clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
+510-510clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
+652-316clang/test/OpenMP/for_reduction_codegen.cpp
+455-455clang/test/OpenMP/single_codegen.cpp
+7,729-5,97693 files not shown
+15,658-13,77499 files

LLVM/project bd40e5eclang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,639-1,65665 files

LLVM/project 474ecf9clang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

cmt

Created using spr 1.3.7
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,639-1,65665 files

LLVM/project 0bc4b45clang/unittests/Analysis CFGBackEdgesTest.cpp, llvm/lib/CAS OnDiskGraphDB.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-1,144llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment.ll
+914-0llvm/lib/Target/Hexagon/HexagonLiveVariables.cpp
+312-0clang/unittests/Analysis/CFGBackEdgesTest.cpp
+222-30llvm/lib/CAS/OnDiskGraphDB.cpp
+208-0llvm/unittests/CAS/OnDiskGraphDBTest.cpp
+134-0llvm/lib/Target/Hexagon/HexagonLiveVariables.h
+1,790-1,17459 files not shown
+2,638-1,65465 files

LLVM/project 71a8973mlir/include/mlir/Bindings/Python IRAttributes.h, mlir/lib/Bindings/Python IRAffine.cpp IRInterfaces.cpp

[MLIR][Python] Remove partial LLVM APIs in python bindings (4/n)  (#180256)

This PR continues work from #178290 
It replaces some LLVM utilities with straightforward `std::`
equivalents.
DeltaFile
+25-36mlir/lib/Bindings/Python/IRAffine.cpp
+26-28mlir/lib/Bindings/Python/IRInterfaces.cpp
+20-23mlir/lib/Bindings/Python/IRAttributes.cpp
+13-17mlir/lib/Bindings/Python/Globals.cpp
+6-5mlir/include/mlir/Bindings/Python/IRAttributes.h
+4-5mlir/lib/Bindings/Python/IRTypes.cpp
+94-1143 files not shown
+100-1229 files

LLVM/project be18ac8llvm/lib/Target/SPIRV SPIRVGlobalRegistry.cpp, llvm/test/CodeGen/SPIRV memset-large-size.ll

[SPIRV] Fix APInt overflow in memset constant array creation (#180189)

In getOrCreateConstIntArray(), the cache UniqueKey encoded the array
size (Num) using the array element type (e.g. i8 for memset). Since Num
is a size_t that can exceed 255, this caused an APInt overflow when Num
> 255. Use i64 for Num in the UniqueKey.
DeltaFile
+22-0llvm/test/CodeGen/SPIRV/memset-large-size.ll
+2-1llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
+24-12 files

LLVM/project 9e355c8llvm/include/llvm/IR IntrinsicsSPIRV.td, llvm/lib/Target/SPIRV SPIRVEmitIntrinsics.cpp SPIRVLegalizePointerCast.cpp

[SPIRV] Fix alignment overflow in memory intrinsics (#180184)

Per SPIR-V spec alignment is 32-bit integer, so it should be encoded as
i8 in the intrinsics'
def.
DeltaFile
+21-0llvm/test/CodeGen/SPIRV/memory-inst-large-align.ll
+4-4llvm/include/llvm/IR/IntrinsicsSPIRV.td
+4-4llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
+30-94 files