LLVM/project 8c28b1a — orc-rt/include/orc-rt/support IntervalMap.h, orc-rt/test/unit/support IntervalMapTest.cpp

[orc-rt] Add IntervalMap::overlaps. (#248794)

IntervalMap::overlaps(KS, KE) returns true if [KS, KE) overlaps any
range in the map. An empty query range [P, P) overlaps only ranges that
strictly contain P, matching ExecutorAddrRange::overlaps.

IntervalMap will be used in upcoming patches that register memory
ranges, and the overlaps operation will allow us to verify that new
registrations don't overlap old ones.
DeltaFile
+78-0orc-rt/test/unit/support/IntervalMapTest.cpp
+21-0orc-rt/include/orc-rt/support/IntervalMap.h
+99-02 files

LLVM/project 10490c8 — clang/include/clang/AST FormatString.h, clang/lib/AST FormatString.cpp

[clang][Sema] Handle length modifiers with OpenBSD kernel printf %b (#120689)

The OpenBSD kernel printf %b takes a length modifier, like %x, and
reads the value with the type it gives. sparc64 has various %llb
formats. Check the length modifier and the value type for %b when
targeting OpenBSD. FreeBSD %b only takes an int, so it stays as is.

Assisted-by: Claude Opus 5.5
DeltaFile
+32-12clang/lib/Sema/SemaChecking.cpp
+24-0clang/test/Sema/format-strings-openbsd.c
+6-2clang/include/clang/AST/FormatString.h
+4-0clang/lib/AST/FormatString.cpp
+66-144 files

LLVM/project d3f8be3 — llvm/lib/Target/Mips/AsmParser MipsAsmParser.cpp, llvm/test/CodeGen/Mips divrem-inline-asm.ll inlineasm-reassemble.ll

[Mips] Preserve filled delay slots in inline asm division macros (#233235)

In reorder mode, wrap branches whose delay slots an expansion fills
itself in .set push/noreorder/pop, so the textual output (e.g. inline
asm) doesn't get a second delay slot when assembled again. Also fill the
mulo/mulou overflow check delay slot in noreorder mode, like div already
does.

As @brad0 remind, for abs on main branch current we will also get the
wrong code: bgez gets an extra nop, and the hardcoded offset lands on
neg. After this pr, it will also be fixed.

Fixes #174909
DeltaFile
+162-0llvm/test/CodeGen/Mips/inlineasm-reassemble.ll
+51-17llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+29-6llvm/test/MC/Mips/mul-macro-variants.s
+24-0llvm/test/CodeGen/Mips/divrem-inline-asm.ll
+13-7llvm/test/MC/Mips/cprestore-reorder.s
+12-6llvm/test/MC/Mips/macro-abs.s
+291-362 files not shown
+306-408 files

LLVM/project 1522569 — llvm/lib/Target/RISCV/MCTargetDesc RISCVAsmBackend.cpp, llvm/test/MC/RISCV symbol-difference-insn-relax-invalid.s pcrel-dot-difference.s

Revert "[RISCV][MC] Diagnose symbol differences in instructions under relaxat…"

This reverts commit dc963db2bdd1166b5a6fb0fc0d95a6de1a86da4a.
DeltaFile
+0-53llvm/test/MC/RISCV/pcrel-dot-difference.s
+2-40llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+0-26llvm/test/MC/RISCV/symbol-difference-insn-relax-invalid.s
+2-1193 files

LLVM/project 263ed84 — llvm/lib/Target/LoongArch LoongArchTargetMachine.h LoongArchTargetMachine.cpp

LoongArch: Use LastSubtargetCache in getSubtargetImpl

Migrate to use the new common infrastructure and pattern which caches
based on the last used subtarget.

Assisted-by: Claude
DeltaFile
+22-10llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+15-0llvm/lib/Target/LoongArch/LoongArchTargetMachine.h
+37-102 files

LLVM/project eff8dff — clang/lib/CodeGen CodeGenSYCL.cpp ItaniumCXXABI.cpp, clang/test/CodeGenCXX apple-kext.cpp

clang: Decide always-inline definitions from the GlobalDecl

SetLLVMFunctionAttributesForDefinition decided whether to add optnone and
noinline partly by reading back alwaysinline attributes that were added
earlier, by the destructor body for -fapple-kext and for OpenCL kernel
stubs just before the call. Pass the GlobalDecl instead of the Decl, and
decide both from the declaration and the destructor or kernel reference
kind.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+28-26clang/lib/CodeGen/CodeGenModule.cpp
+19-0clang/test/CodeGenCXX/apple-kext.cpp
+1-7clang/lib/CodeGen/CGClass.cpp
+2-2clang/lib/CodeGen/ItaniumCXXABI.cpp
+2-2clang/lib/CodeGen/CGExpr.cpp
+1-1clang/lib/CodeGen/CodeGenSYCL.cpp
+53-388 files not shown
+61-4514 files

LLVM/project ea049fa — llvm/include/llvm/ExecutionEngine/Orc DarwinPlatform.h, llvm/lib/ExecutionEngine/Orc CMakeLists.txt DarwinPlatform.cpp

[ORC] Add empty DarwinPlatform, enable it in llvm-jitlink. (#248735)

DarwinPlatform is intended to be an eventual replacement for
MachOPlatform, and the first in a series that will see ELFNixPlatform
and COFFPlatform similarly replaced. The older versions will be left
in-place for the time being, until the old ORC runtime can be deprecated
and removed.
DeltaFile
+70-0llvm/lib/ExecutionEngine/Orc/DarwinPlatform.cpp
+48-0llvm/include/llvm/ExecutionEngine/Orc/DarwinPlatform.h
+21-3llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+1-0llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
+140-34 files

LLVM/project 54c73f0 — llvm/lib/Target/AMDGPU GCNPreRAAntiHints.h GCNPreRAAntiHints.cpp

AMDGPU: Make the anti-hints rule table constexpr

The rule table was a function-local static SmallVector, built on first
use and destroyed at exit. This caused corruption with multithreaded
compiles. Build a constexpr table instead.

Assisted-by: Claude
DeltaFile
+108-132llvm/lib/Target/AMDGPU/GCNPreRAAntiHints.cpp
+21-3llvm/lib/Target/AMDGPU/GCNPreRAAntiHints.h
+129-1352 files

LLVM/project d93c46a — llvm/lib/Target/Hexagon HexagonGlobalSchedulerV2.cpp, llvm/test/CodeGen/AMDGPU srem.ll load-global-i8.ll

Merge branch 'main' into users/gandhi56/amdgpu-gisel-legalize-merge-unmerge
DeltaFile
+7,106-7,623llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+2,746-2,857llvm/test/CodeGen/X86/vector-interleaved-store-i16-stride-7.ll
+2,597-2,922llvm/test/CodeGen/X86/vector-compress.ll
+0-5,395llvm/test/CodeGen/AMDGPU/load-global-i8.ll
+0-5,274llvm/test/CodeGen/AMDGPU/srem.ll
+5,270-0llvm/lib/Target/Hexagon/HexagonGlobalSchedulerV2.cpp
+17,719-24,0716,313 files not shown
+332,834-168,6496,319 files

LLVM/project 31c3638 — lld/ELF/Arch SPARCV9.cpp, lld/test/ELF sparcv9-tls-dtpoff.s

[lld][ELF][SPARC] Support R_SPARC_TLS_DTPOFF32/64 in non-alloc sections (#248653)

GCC, and now clang, use %r_tls_dtpoff32/%r_tls_dtpoff64 in .debug_info
for the location of thread-local variables. Resolve them as R_DTPREL,
the offset within the TLS segment (SPARC uses no DTV bias).

Assisted-by: Claude Opus 5.5
DeltaFile
+43-0lld/test/ELF/sparcv9-tls-dtpoff.s
+9-0lld/ELF/Arch/SPARCV9.cpp
+52-02 files

LLVM/project 58ad823 — llvm/lib/InterfaceStub ELFObjHandler.cpp, llvm/test/tools/llvm-ifs version-ok.ifs conflict-unique.test

[llvm-ifs] Handle STB_GNU_UNIQUE ELF symbols (#241122)

Add an optional "Unique: true" symbol attribute to the IFS text format
for STB_GNU_UNIQUE ELF bindings and bump IFSVersionCurrent (and Clang's
-emit-interface-stubs output) from 3.0 to 3.1 while preserving backward
compatibility with existing 3.0 IFS files.

When generating ELF stubs, emit STB_GNU_UNIQUE for unique symbols and
set EI_OSABI to ELFOSABI_GNU whenever any symbol uses "Unique: true"
(keeping ELFOSABI_NONE otherwise) so static linkers handle resolution
directly.

Also reject symbols specifying both Weak and Unique, handle Unique and
major-version mismatches symmetrically when merging IFS files, diagnose
unsupported exported ELF bindings, and update unit and lit tests.

Assisted by Gemini.
DeltaFile
+359-0llvm/test/tools/llvm-ifs/binary-read-gnu-unique.test
+218-0llvm/unittests/InterfaceStub/ELFYAMLTest.cpp
+62-0llvm/test/tools/llvm-ifs/conflict-unique.test
+47-14llvm/lib/InterfaceStub/ELFObjHandler.cpp
+12-2llvm/tools/llvm-ifs/llvm-ifs.cpp
+11-2llvm/test/tools/llvm-ifs/version-ok.ifs
+709-1844 files not shown
+788-6750 files

LLVM/project 6d2fe54 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Constify the iterator in the for loop

Co-authored-by: Nick Desaulniers <ndesaulniers at google.com>
DeltaFile
+1-1llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+1-11 files

LLVM/project bb0f9c2 — llvm/lib/Target/RISCV RISCVInstrInfoVPseudos.td, llvm/test/CodeGen/RISCV/rvv pr165232.ll remat.ll

[RISCV] Rematerialize vmset.m and vmclr.m (#248627)

PseudoVMSET_M_* and PseudoVMCLR_M_* only take an AVL and SEW operand and
have no passthru, so they can be rematerialized like vmv.v.i and vid.v.
The pseudo's SEW/LMUL ratio is fixed by its opcode, so recomputing it
with the same AVL produces the same VL, and mask results are tail
agnostic.

Assisted-by: Claude
DeltaFile
+99-0llvm/test/CodeGen/RISCV/rvv/remat.ll
+17-36llvm/test/CodeGen/RISCV/rvv/pr165232.ll
+1-0llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+117-363 files

LLVM/project afa7081 — llvm/lib/Transforms/Scalar LoopIdiomRecognize.cpp, llvm/test/Transforms/LoopIdiom strlen-funclet.ll

[LoopIdiom] Give a strlen formed in a funclet its funclet bundle (#246787)

When a strlen or wcslen loop is in a Windows EH funclet, the call that
replaced it had no "funclet" operand bundle. WinEHPrepare then treats
the call as implausible and makes the rest of the funclet unreachable,
so a catch handler with such a loop traps as soon as the string isn't
empty. Add the bundle of the preheader's funclet, as the inliner does,
and leave the loop alone if the preheader isn't in exactly one funclet.

Assisted-by: Claude Opus 5.5 (Anthropic)
DeltaFile
+73-0llvm/test/Transforms/LoopIdiom/strlen-funclet.ll
+16-0llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+89-02 files

LLVM/project a9bbd0f — llvm/docs LangRef.md

[LangRef] Specify vp.strided.{load,store} is byte aligned

https://github.com/llvm/llvm-project/pull/241715 clarified in llubi that the individual lane accesses of a strided load/store are byte aligned, and that the align attribute is only applied to the base pointer. This matches how e.g. the attributor propagates the align attribute.

Update the LangRef to reflect this, and whilst we're here convert the example to opaque pointers.
DeltaFile
+14-12llvm/docs/LangRef.md
+14-121 files

LLVM/project 408a649 — clang/include/clang/Serialization ASTWriter.h, clang/lib/Serialization ASTWriterDecl.cpp ASTWriter.cpp

[C++20] [Modules] Touch members for dtor (#248767)

Close https://github.com/llvm/llvm-project/issues/246162

The root cause of the problem is, some member of
the base of the dtor is omitted in reduced BMI.

The corresponding fix is to touch them for dtor in reduced BMI.

Assisted by AI.
DeltaFile
+136-0clang/test/Modules/pr246162.cppm
+34-0clang/lib/Serialization/ASTWriter.cpp
+2-0clang/lib/Serialization/ASTWriterDecl.cpp
+2-0clang/include/clang/Serialization/ASTWriter.h
+174-04 files

LLVM/project bc29edc — lldb/include/lldb/Host/common TCPSocket.h, lldb/source/Host/common TCPSocket.cpp

[lldb] Move PlatformWasm::FindFreeTCPPort to TCPSocket::FindFreePort (NFC) (#248693)

Move the free-port lookup out of the wasm platform so other platforms
can use it.

Broken out from PR #243197 after feedback

Assisted-by: Claude Code using Opus 5.5

Co-authored-by: Michael Georgariou III <georgariou at apple.com>
DeltaFile
+12-0lldb/unittests/Host/SocketTest.cpp
+1-9lldb/source/Plugins/Platform/WebAssembly/PlatformWasm.cpp
+7-0lldb/source/Host/common/TCPSocket.cpp
+4-2lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.cpp
+4-0lldb/include/lldb/Host/common/TCPSocket.h
+0-3lldb/source/Plugins/Platform/WebAssembly/PlatformWasm.h
+28-146 files

LLVM/project 3153576 — flang/lib/Optimizer/HLFIR/Transforms SimplifyHLFIRIntrinsics.cpp, flang/test/Driver array-runtime.f90

[Flang] Use simple summation by default at all optimization levels

Add a scope option to SimplifyHLFIRIntrinsics and adjust the pipeline to
enable SUM expansion at -O0 while keeping other intrinsic expansions
conditional on array expression optimization. This makes simple
summation the default for SUM expansion across optimization levels.

Previously, floating-point SUM used the runtime's Kahan summation at
-O0, whereas -O1 and higher generally generated loops with simple
sequential addition. This expansion substituted a different algorithm
rather than inlining the runtime implementation, causing numerical
results to depend on the optimization level.

Add -fcompensated-sum to preserve the runtime's compensated algorithm
for REAL and COMPLEX SUM. When enabled, exclude SUM from HLFIR intrinsic
simplification and prevent SimplifyIntrinsics from replacing real SUM
runtime calls with uncompensated reduction loops.

Fixes #176282

    [3 lines not shown]
DeltaFile
+54-37flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
+68-0flang/test/HLFIR/simplify-hlfir-intrinsics-compensated-sum.fir
+59-0flang/test/Integration/compensated-sum.f90
+31-16flang/test/Integration/OpenMP/parallel-private-reduction-worstcase.f90
+39-0flang/test/Transforms/simplifyintrinsics-compensated-sum.fir
+23-9flang/test/Driver/array-runtime.f90
+274-6213 files not shown
+342-6719 files

LLVM/project 7ed46c5 — llvm/lib/Transforms/IPO Attributor.cpp

Attributor: Fix inverted liveness lookup in checkForAllInstructions

attributor is 0.1-2.0% and attributor-cgscc 0.1-1.0% faster on CTMark
sources (callgrind).

Assisted-by: Claude
DeltaFile
+7-5llvm/lib/Transforms/IPO/Attributor.cpp
+7-51 files

LLVM/project b5b2890 — llvm/include/llvm/ADT FoldingSet.h, llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

DAG: Don't zero a mostly empty CSE map on every clear

CSEMap never shrinks, so after one large block, clearing it zeroes a
large table even for small DAGs. Mesa hits this since it compiles many
functions with one pass manager.

Add a FoldingSetBase::clear() overload that takes the set's nodes and
zeroes only their probe chains. Use it when CSEMap is less than an
eighth full.

Compile time of radeonsi shader-db shaders: -1.0% (-0.9% cycles).
CTMark instructions:u: +0.01% (-O3), +0.003% (-O0 -g).

Assisted-by: Claude
DeltaFile
+51-0llvm/unittests/ADT/FoldingSet.cpp
+25-0llvm/include/llvm/ADT/FoldingSet.h
+7-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+83-13 files

LLVM/project fdcef9b — utils/bazel/llvm-project-overlay/libc/test/src/stdio BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

[Bazel] Fixes b421d8d (#248763)

This fixes b421d8d3c00f1f4ce0baaa03cf21a5e3b2dd159f (#248696).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=b421d8d3c00f1f4ce0baaa03cf21a5e3b2dd159f

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+2-0utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
+4-02 files

LLVM/project d636877 — lldb/source/Symbol Symtab.cpp

[lldb][NFC] Don't copy the name index map in Symtab::FindFunctionSymbols (#248745)

GetNameToSymbolIndexMap() returns a reference, but `auto map = ...`
copied the whole UniqueCStringMap for each base name, method name or
selector lookup, which can be millions of entries for a large binary, to
read a few matches.

assisted-by: claude
DeltaFile
+1-1lldb/source/Symbol/Symtab.cpp
+1-11 files

LLVM/project c715b85 — llvm/lib/CodeGen RegisterCoalescer.cpp

Check isPHIDef before removing pruned subrange value
DeltaFile
+6-5llvm/lib/CodeGen/RegisterCoalescer.cpp
+6-51 files

LLVM/project ef9ede0 — llvm/lib/Target/Mips MipsTargetMachine.h MipsTargetMachine.cpp

Mips: Include the stack alignment override in the subtarget key (#248753)

The subtarget depends on the override-stack-alignment module flag, so
modules with different values need different subtargets.

Assisted-by: Claude
DeltaFile
+9-4llvm/lib/Target/Mips/MipsTargetMachine.cpp
+3-1llvm/lib/Target/Mips/MipsTargetMachine.h
+12-52 files

LLVM/project b0bfa06 — llvm/lib/Transforms/Utils EntryExitInstrumenter.cpp, llvm/test/Transforms/EntryExitInstrumenter mcount-with-frompc.ll

EntryExitInstrumenter: Don't pass the return address to __cyg_profile_func_enter_bare (#248706)

__cyg_profile_func_enter_bare does not take any arguments. It was
passed the return address on AArch64, LoongArch and RISC-V because it
shared the mcount path, which started passing it for _mcount in
eafbab6facb0.

Assisted-by: Claude
DeltaFile
+9-0llvm/test/Transforms/EntryExitInstrumenter/mcount-with-frompc.ll
+3-2llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
+12-22 files

LLVM/project 6cabcfd — llvm/lib/Target/RISCV RISCVTargetMachine.h RISCVTargetMachine.cpp

RISCV: Include the target ABI in the subtarget key (#248750)
DeltaFile
+5-4llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+2-1llvm/lib/Target/RISCV/RISCVTargetMachine.h
+7-52 files

LLVM/project 41e148b — compiler-rt/lib/ctx_profile RootAutoDetector.cpp

[ctxprof] Hold the samples lock while the root auto-detector reads them

The root auto-detector means to lock each thread's samples while it reads them, but the lock guard was an unnamed temporary, so the lock was released at the end of the same statement and the samples were read unlocked. Name the guard so the lock is held while the samples are read.
DeltaFile
+1-1compiler-rt/lib/ctx_profile/RootAutoDetector.cpp
+1-11 files

LLVM/project 9a872eb — compiler-rt/lib/ctx_profile CtxInstrProfiling.cpp

[ctxprof] Assert CurrentRootDepth does not overflow
DeltaFile
+6-2compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
+6-21 files

LLVM/project de190cd — compiler-rt/lib/ctx_profile CtxInstrProfiling.h CtxInstrProfiling.cpp, compiler-rt/lib/ctx_profile/tests CtxInstrProfilingTest.cpp

[ctxprof] Avoid blocking on flat profile allocation

Flat profile allocation previously blocked on the function and flat arena mutexes, which can stall or deadlock flat-profile allocation if a user-space fiber holds a lock while a sibling spins, or if a signal handler interrupts a thread holding one of those mutexes. Switch those acquisitions in getFlatProfile to TryLock and fall back to the scratch context when contended, and log the missed activation count on profile fetch when nonzero.
DeltaFile
+153-0compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
+69-40compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
+3-0compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
+225-403 files

LLVM/project 40298f6 — compiler-rt/lib/ctx_profile CtxInstrProfiling.cpp, compiler-rt/lib/ctx_profile/tests CtxInstrProfilingTest.cpp

[ctxprof] Preserve live current root across nested and recursive entries

A failed TryLock in tryStartContextGivenRoot previously cleared __llvm_ctx_profile_current_context_root even when the thread already held an outer root, preventing the outer root from unlocking Taken on exit. Keep a live __llvm_ctx_profile_current_context_root intact across nested or recursive root entries and track the entry depth of the held root so Taken is unlocked only on its outermost exit.
DeltaFile
+160-0compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
+17-1compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
+177-12 files