LLVM/project 7599c94 — mlir/cmake/modules MLIRDetectPythonEnv.cmake, mlir/examples/standalone pyproject.toml

Revert "[MLIR][Python] Drop Python 3.10 and enable Python 3.15 (#232181)"

This reverts commit 80d21b345a2bd9be4716e8a62b83cf93d594f727.
DeltaFile
+2-10mlir/cmake/modules/MLIRDetectPythonEnv.cmake
+4-7mlir/examples/standalone/pyproject.toml
+3-6mlir/python/requirements.txt
+9-233 files

LLVM/project 6ec5f00 — llvm/lib/CAS OnDiskCommon.h OnDiskCommon.cpp, llvm/unittests/CAS CMakeLists.txt OnDiskCommonUtils.h

[llvm][cas] Fix indefinite wait for CAS shared locks (#236929)

On Darwin, flock may only wake a single waiting shared lock request
after an exclusive lock is released. If that first waiter happens to be
a long-running CAS client, it may indefinitely delay other waiting
shared accesses that are already queued up. Workaround this with a retry
loop so that all shared CAS clients will run concurrently.

Assisted-by: claude (helped with writing the test)

rdar://191274568
DeltaFile
+102-0llvm/unittests/CAS/FileLockTest.cpp
+18-0llvm/lib/CAS/OnDiskCommon.cpp
+3-2llvm/lib/CAS/OnDiskCommon.h
+2-0llvm/unittests/CAS/OnDiskCommonUtils.h
+1-0llvm/unittests/CAS/CMakeLists.txt
+126-25 files

LLVM/project 3d628ae — llvm/include/llvm/Target/GlobalISel Combine.td, llvm/test/CodeGen/AArch64/GlobalISel combine-max-min.mir combine-max-min.ll

[Gisel] smin/umin optimization rewrites (#203939)

This is a twin PR of #188267, adding the same SDAG
[combines](https://github.com/llvm/llvm-project/blob/20aff2085c358d3e112b245494161ddb9ffe0410/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp#L4272)
for umin/smin.
DeltaFile
+171-0llvm/test/CodeGen/AArch64/GlobalISel/combine-max-min.ll
+157-1llvm/test/CodeGen/AArch64/GlobalISel/combine-max-min.mir
+25-1llvm/include/llvm/Target/GlobalISel/Combine.td
+353-23 files

LLVM/project 0bb6191 — llvm/test/Transforms/SLPVectorizer/AArch64 splat-gather-undef-lane.ll

[SLP][NFC]Add a test with incorrect undef-to-poison vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/237279
DeltaFile
+43-0llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-undef-lane.ll
+43-01 files

LLVM/project 9cab2a5 — mlir/lib/Conversion/ArithToEmitC ArithToEmitC.cpp, mlir/test/Conversion/ArithToEmitC arith-to-emitc.mlir

address comments
DeltaFile
+12-11mlir/test/Conversion/ArithToEmitC/arith-to-emitc.mlir
+7-9mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
+0-11mlir/test/Dialect/Arith/canonicalize.mlir
+0-11mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
+3-1mlir/test/Transforms/loop-invariant-code-motion.mlir
+22-435 files

LLVM/project 281e2c2 — llvm/test/CodeGen/X86 kshift.ll

[X86] Add test coverage for #235657 (#237256)
DeltaFile
+30-0llvm/test/CodeGen/X86/kshift.ll
+30-01 files

LLVM/project 268bd22 — llvm/lib/CodeGen/SelectionDAG LegalizeDAG.cpp, llvm/lib/Target/LoongArch LoongArchFloat32InstrInfo.td LoongArchISelLowering.h

SelectionDAG: Build FP immediates from integer bits in the legalizer (#233767)

Teach the generic legalizer to legalize FP immediates as a bitcast of
an opaque integer constant. Migrate LoongArch to use the new helper
instead of doing it in custom lowering.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+33-34llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+25-15llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+5-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+2-2llvm/lib/Target/LoongArch/LoongArchFloat32InstrInfo.td
+65-514 files

LLVM/project 7d4e965 — llvm/lib/MC MCObjectFileInfo.cpp, llvm/test/CodeGen/SystemZ zos-dwarf-ada-crash.ll

[SystemZ][z/OS] Add missing ADA reference to DWARF sections

Labels marked as DATA needs a reference to the ADA. However, this
is missing for the DWARF sections, which can lead to crashes in
certain scenarios. Fix is to set the ADA reference.

Assisted by: IBM Bob
DeltaFile
+39-0llvm/test/CodeGen/SystemZ/zos-dwarf-ada-crash.ll
+1-0llvm/lib/MC/MCObjectFileInfo.cpp
+40-02 files

LLVM/project 5965fb3 — clang/include/clang/Sema Sema.h, clang/lib/Parse ParseCXXInlineMethods.cpp

[clang][ThreadSafety] Instantiate a parameter's attribute naming a later parameter (#232784)

Under -fexperimental-late-parse-attributes, an attribute on a parameter
may name a parameter declared after it:

  template <class T> void f(void (*release)(T) RELEASE(mu), Mutex *mu);

A parameter's attributes were instantiated as the parameter was, before
any later one, so instantiating this asserted in
LocalInstantiationScope::findInstantiationOf, and the late parsing
change rejected it in a template. Defer a parameter's late-parsed
attributes, with the mechanism a class uses for its members, until every
parameter of the prototype is instantiated in
TransformFunctionTypeParams. A function whose type needs no substitution
instantiated its parameters one by one instead; route it through
SubstParmTypes, so there is one place that defers. SubstParmTypes now
takes whether to evaluate constraints, which SubstFunctionType passes in
both of its calls, so a typedef'd function type also follows the
instantiator's setting instead of always evaluating them. With that,

    [3 lines not shown]
DeltaFile
+73-30clang/lib/Sema/SemaTemplateInstantiate.cpp
+65-35clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+49-0clang/test/SemaCXX/warn-thread-safety-late-parsing-instantiation.cpp
+33-14clang/include/clang/Sema/Sema.h
+15-17clang/test/SemaCXX/warn-thread-safety-late-parsing.cpp
+6-13clang/lib/Parse/ParseCXXInlineMethods.cpp
+241-1093 files not shown
+244-1139 files

LLVM/project 232e021 — llvm/test/CodeGen/ARM regcoalesce-undef-copy-subreg-redef.mir prera-ldst-insertpt.mir, llvm/test/CodeGen/Thumb opt-phis.mir

ARM: Remove kill flags on virtual registers from MIR tests (#236921)

The verifier will soon disallow these. Delete tests which only differ
from another in the kill flags.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+54-54llvm/test/CodeGen/ARM/no-register-coalescing-in-returnsTwice.mir
+29-67llvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir
+0-39llvm/test/CodeGen/Thumb/opt-phis.mir
+14-14llvm/test/CodeGen/Thumb2/phi_prevent_copy.mir
+14-14llvm/test/CodeGen/ARM/regcoalesce-undef-copy-subreg-redef.mir
+14-14llvm/test/CodeGen/ARM/prera-ldst-insertpt.mir
+125-20228 files not shown
+224-30134 files

LLVM/project 59e7e15 — clang/docs ReleaseNotes.md, clang/include/clang/Analysis/Analyses ThreadSafetyTIL.h ThreadSafetyTraverse.h

[clang][ThreadSafety] Resolve fields named from nested struct/union members (#233965)

Some real-world projects (e.g. the Linux kernel) rely on naming locks in
the enclosing record, rather than siblings of the annotated member. This
is effectively a new feature, but projects already relied on it, because
`&lock` used to be misread as the `&Scratch::lock` wildcard, meaning any
object's `lock` (corrected in llvm/llvm-project at 217e229a1f32, reverted
in llvm/llvm-project at 51ec77936fb5 until this merges).

This will fix the issue reported in
https://github.com/ClangBuiltLinux/linux/issues/2187.

The nested struct or union may be named or anonymous, and its member may
be reached through a member, an array element, or an address-of or
dereference; all are handled the same way. A name resolves to the
innermost struct declaring it. Members of an anonymous struct or union
may likewise be named by attributes on the enclosing struct.

```c++

    [45 lines not shown]
DeltaFile
+263-1clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+198-0clang/test/Sema/warn-thread-safety-analysis.c
+136-25clang/lib/Analysis/ThreadSafetyCommon.cpp
+60-22clang/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h
+12-0clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
+7-0clang/docs/ReleaseNotes.md
+676-482 files not shown
+683-488 files

LLVM/project 46e70bb — llvm/include/llvm/IR PatternMatch.h, llvm/lib/Transforms/InstCombine InstCombineCompares.cpp InstCombineCalls.cpp

[PatternMatch] Made m_FNeg match only fneg instructions (#235348)

`m_FNeg` also matches `fsub -0.0, X` and forms like `fsub nsz +0.0, X`.
This is incorrect as fneg only flips the sign bit, while a subtraction
from zero follows full FP arithmetic and may quiet a QNaN

Fixes #234426.
Fixes #233341.
DeltaFile
+36-16llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+34-15llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+23-16llvm/include/llvm/IR/PatternMatch.h
+29-0llvm/test/Transforms/InstSimplify/copysign-snan.ll
+19-9llvm/lib/Transforms/Scalar/Reassociate.cpp
+13-5llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+154-6117 files not shown
+221-9523 files

LLVM/project c369e22 — llvm/lib/Target/X86 X86RegisterInfo.cpp, llvm/test/CodeGen/X86/apx csr-first-use-cost-ppx.ll

[X86][APX] Use CSR first-use cost 1 with PPX (#235644)

With PPX, push/pop pairs don't access memory, so getCSRFirstUseCost()
returns 0. That disables RegAllocGreedy's frequency-weighted trade-off
between using a new callee-saved register and splitting/spilling the
live range, so small hot functions save and restore CSRs in the entry
block on every call instead of spilling around the calls on cold paths.
The saves are still executed instructions.

Return a first-use cost of 1 instead of 0 when PPX is available. Targets
without PPX keep a cost of 2.

Assisted by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+200-0llvm/test/CodeGen/X86/apx/csr-first-use-cost-ppx.ll
+3-2llvm/lib/Target/X86/X86RegisterInfo.cpp
+203-22 files

LLVM/project e69219d — compiler-rt/lib/csan CMakeLists.txt, compiler-rt/lib/csan/offload csan_offload_preinit.cpp CMakeLists.txt

[compiler-rt] Remove dlsym interceptor and support `-shared-libsan` for CSan

Summary:
Follow the UBSan offload runtime. Offload now resolves HSA through the
global scope, so the `dlsym` interceptor is no longer needed. The real
HSA entry points are still taken from the loaded HSA library rather than
`RTLD_NEXT`, since every DSO with a static runtime exports the same
wrappers and they would otherwise chain back into each other.

Build `libclang_rt.csan.so` with the offload objects folded in. The
exported HSA wrappers report failure when HSA is absent and warn when HSA
was loaded ahead of the runtime. The preinit hook moves to a separate
`csan_offload-preinit` archive for executables.
DeltaFile
+34-98compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+84-9compiler-rt/lib/csan/CMakeLists.txt
+35-0compiler-rt/test/csan/hsa-load-order.cpp
+22-4compiler-rt/lib/csan/offload/CMakeLists.txt
+24-0compiler-rt/test/csan/hsa-missing.cpp
+22-0compiler-rt/lib/csan/offload/csan_offload_preinit.cpp
+221-1115 files not shown
+241-11111 files

LLVM/project a47c24e — compiler-rt/lib/csan csan_watch.h csan_report.cpp, compiler-rt/lib/csan/offload csan_offload_report.cpp csan_offload_hsa_interceptors.cpp

[compiler-rt] Add 'csan' library for the concurrency sanitizer

Summary:
Adds the runtime for the concurrency sanitizer, both CPU and GPU.
Fundamentally, this works using the following pseudocode:

```c
static u64 watchpoints[N]; // Hash-indexed, zero is empty.

// Emitted before the access, so we never trip on our own write.
void check_access(volatile void *addr, u32 size, u32 type) {
    // Every access probes. A read conflicts only with a watched write, a
    // write conflicts with either.
    if (u64 *wp = find_watchpoint(addr, size, type))
        consume(wp, this_pc()); // Hand our location to the owner.

    if (!should_sample()) // Wave-uniform, 1-in-N chance.
        return;


    [17 lines not shown]
DeltaFile
+456-0compiler-rt/lib/csan/csan_gpu.cpp
+370-0compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+334-0compiler-rt/lib/csan/csan.cpp
+279-0compiler-rt/lib/csan/csan_report.cpp
+184-0compiler-rt/lib/csan/offload/csan_offload_report.cpp
+163-0compiler-rt/lib/csan/csan_watch.h
+1,786-044 files not shown
+2,940-250 files

LLVM/project 363a54b — compiler-rt/lib/csan csan.cpp, compiler-rt/test/csan access-sizes.cpp

Use unaligned loads when snapshotting watched values
DeltaFile
+22-0compiler-rt/test/csan/access-sizes.cpp
+3-3compiler-rt/lib/csan/csan.cpp
+25-32 files

LLVM/project 79eb82c — compiler-rt/cmake config-ix.cmake, compiler-rt/cmake/Modules AllSupportedArchDefs.cmake

comments
DeltaFile
+13-9compiler-rt/lib/csan/csan_gpu.cpp
+3-3compiler-rt/cmake/config-ix.cmake
+2-2compiler-rt/lib/csan/CMakeLists.txt
+1-1compiler-rt/test/csan/CMakeLists.txt
+1-1compiler-rt/lib/csan/offload/CMakeLists.txt
+1-0compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+21-166 files

LLVM/project cd97716 — compiler-rt/lib/csan csan_gpu.cpp csan.cpp, compiler-rt/test/csan volatile.cpp

Remove separate volatile entry points
DeltaFile
+49-0compiler-rt/test/csan/volatile.cpp
+22-0compiler-rt/test/csan/AMDGPU/volatile.hip
+0-4compiler-rt/lib/csan/csan_gpu.cpp
+0-4compiler-rt/lib/csan/csan.cpp
+71-84 files

LLVM/project f8deafc — clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver fsanitize.c fsanitize-concurrency-offload.c

[Clang] Support `-shared-libsan` for offload CSan

Summary:
Follow the UBSan handling. The shared runtime embeds the HSA
interceptors, so `csan_offload` is only linked with static runtimes and
executables pull in `csan_offload-preinit` to initialize early.
DeltaFile
+38-0clang/test/Driver/fsanitize-concurrency-offload.c
+9-4clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/test/Driver/fsanitize.c
+50-53 files

LLVM/project 150db11 — clang/test/CodeGen sanitize-concurrency.c, clang/test/CodeGen/Inputs sanitize-concurrency-ignorelist.txt

ignore
DeltaFile
+29-0clang/test/CodeGen/sanitize-concurrency.c
+2-0clang/test/CodeGen/Inputs/sanitize-concurrency-ignorelist.txt
+31-02 files

LLVM/project 82aed7c — clang/lib/Driver SanitizerArgs.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp CommonArgs.cpp

Comments
DeltaFile
+48-0clang/test/Driver/fsanitize-concurrency-offload.c
+27-0clang/test/Driver/fsanitize.c
+16-7clang/lib/Driver/ToolChains/Clang.cpp
+11-4clang/lib/Driver/SanitizerArgs.cpp
+5-6clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-2clang/lib/Driver/ToolChains/AMDGPU.cpp
+110-195 files not shown
+112-2111 files

LLVM/project 8827495 — clang/docs ConcurrencySanitizer.md, clang/lib/CodeGen CodeGenFunction.cpp

[Clang] Add support for the `-fsanitize=concurrency` runtime

Summary:
Add the frontend sanitizer kind, function attributes, pass pipeline
integration, predefined macro, driver handling, and documentation for
ConcurrencySanitizer.
DeltaFile
+207-0clang/docs/ConcurrencySanitizer.md
+73-0clang/test/CodeGen/sanitize-concurrency.c
+32-8clang/lib/Driver/ToolChains/CommonArgs.cpp
+15-0clang/test/Driver/fsanitize.c
+10-4clang/lib/Driver/SanitizerArgs.cpp
+10-3clang/lib/CodeGen/CodeGenFunction.cpp
+347-1510 files not shown
+375-1616 files

LLVM/project f779b1d — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer callbacks.ll

Keep distinguished volatile reads before a later write

A volatile write is reported as atomic, so it does not cover an earlier
plain read. A smaller write or an intervening acquire still drops the
read, matching ThreadSanitizer.
DeltaFile
+30-0llvm/test/Instrumentation/ConcurrencySanitizer/callbacks.ll
+15-6llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+45-62 files

LLVM/project e271354 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer selection.ll

simplify to TSan shape and address matt comments
DeltaFile
+28-74llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+29-8llvm/test/Instrumentation/ConcurrencySanitizer/selection.ll
+57-822 files

LLVM/project 0dd083c — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp

names and braces
DeltaFile
+39-17llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+39-171 files

LLVM/project 84ca163 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp

enum class and return Res
DeltaFile
+20-14llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+20-141 files

LLVM/project 15f61a4 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer selection.ll

Yaxunl comments
DeltaFile
+35-7llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+22-0llvm/test/Instrumentation/ConcurrencySanitizer/selection.ll
+57-72 files

LLVM/project 8145ae9 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp

fix IIRBBuilder
DeltaFile
+2-4llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+2-41 files

LLVM/project dd029dc — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer memintrinsics.ll

Instrument atomic and pattern memory intrinsics
DeltaFile
+28-26llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+54-0llvm/test/Instrumentation/ConcurrencySanitizer/memintrinsics.ll
+82-262 files

LLVM/project 4bc5208 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer selection.ll

comments
DeltaFile
+38-0llvm/test/Instrumentation/ConcurrencySanitizer/selection.ll
+7-5llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+45-52 files