LLVM/project 0fe081b — clang/test/CIR/CodeGenCoroutines coro-task.cpp, libc/docs/headers/math log.md index.rst

Merge branch 'main' into users/c8ef/is_integer
DeltaFile
+1,252-15clang/test/CIR/CodeGenCoroutines/coro-task.cpp
+1,185-0llvm/test/Transforms/IndVarSimplify/implied-nonneg-from-unsigned-bound-swapped.ll
+638-0llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/variance-8x16.ll
+0-637libc/docs/headers/math/index.rst
+630-2llvm/test/Transforms/SLPVectorizer/AArch64/loop-accumulator-reductions-before-seeds.ll
+598-0libc/docs/headers/math/log.md
+4,303-654555 files not shown
+20,411-8,254561 files

LLVM/project f1fd5a2 — llvm/lib/TableGen Record.cpp

TableGen: Remember superclass results when finding derived definitions

getAllDerivedDefinitions checks every def with isSubClassOf, which
searches the def's superclasses recursively. Most defs share a few
superclasses, so the same searches are repeated many times: for AMDGPU,
each uncached query checks 153000 defs. Remember the result for each
superclass during a query instead.

All 366 tablegen runs in an LLVM build with all targets:

            Gigainstructions  Gigacycles      CPU seconds
  Before    2277              1477            521
  After     2264 (-0.5%)      1423 (-3.7%)    503 (-3.3%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+40-4llvm/lib/TableGen/Record.cpp
+40-41 files

LLVM/project de1772a — llvm/test/CodeGen/WebAssembly simd-relaxed-fmin.ll simd-relaxed-fmax.ll

 [SelectionDAG] Do not treat variadic vreg results as physreg defs (#229847)

AddSchedEdges sets hasPhysRegDefs on a scheduling unit when a machine
node has more used results than explicit defs. Later, in the list
scheduler, canClobberPhysRegDefs assumes that each extra result is an
implicit physical register def. It then indexes implicit_defs() by the
result number.

This assumption is wrong for instructions with variadicOpsAreDefs on
targets where usesPhysRegsForValues returns false, such as WebAssembly.
On these targets, the extra results are virtual registers, not physical
ones. As a result, RegReductionPQBase::PrescheduleNodesWithMultipleUses
reads past the end of the implicit def list.

This change makes the scheduler check for this case. Now hasPhysRegDefs
is set only when the extra results really are physical registers.

Effect on WebAssembly code:
Before this change, every WebAssembly call with a used result was marked

    [16 lines not shown]
DeltaFile
+184-176llvm/test/CodeGen/WebAssembly/f128-minmax.ll
+63-63llvm/test/CodeGen/WebAssembly/simd-relaxed-fma.ll
+28-28llvm/test/CodeGen/WebAssembly/vector-reduce.ll
+18-15llvm/test/CodeGen/WebAssembly/libcall_vectorized.ll
+16-10llvm/test/CodeGen/WebAssembly/simd-relaxed-fmin.ll
+16-10llvm/test/CodeGen/WebAssembly/simd-relaxed-fmax.ll
+325-3026 files not shown
+369-31712 files

LLVM/project fff3538 — clang/test/CIR/CodeGenCoroutines coro-task.cpp, libc/docs/headers/math log.md index.rst

Merge branch 'main' into users/rnk/tre-byval-copyback
DeltaFile
+1,252-15clang/test/CIR/CodeGenCoroutines/coro-task.cpp
+1,185-0llvm/test/Transforms/IndVarSimplify/implied-nonneg-from-unsigned-bound-swapped.ll
+638-0llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/variance-8x16.ll
+0-637libc/docs/headers/math/index.rst
+630-2llvm/test/Transforms/SLPVectorizer/AArch64/loop-accumulator-reductions-before-seeds.ll
+598-0libc/docs/headers/math/log.md
+4,303-654532 files not shown
+18,744-7,849538 files

LLVM/project 4c444a6 — lldb/include/lldb/Target TargetGroupList.h TargetGroup.h, lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp

[lldb] Track CPU and accelerator target relationships (#232906)

### Summary

This PR adds the relationship between CPU and accelerator targets.

## Test

Added unit and end to end testing
DeltaFile
+77-0lldb/unittests/Target/TargetGroupTest.cpp
+42-10lldb/include/lldb/Target/TargetGroup.h
+45-0lldb/source/Target/TargetGroup.cpp
+38-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+19-0lldb/test/API/accelerator/mock/TestMockAcceleratorActions.py
+19-0lldb/include/lldb/Target/TargetGroupList.h
+240-103 files not shown
+260-179 files

LLVM/project d4d0215 — lldb/include/lldb/Core Module.h, lldb/source/Core Module.cpp

[lldb] Use std::string for Module's ObjectName (#234301)
DeltaFile
+13-14lldb/source/Core/Module.cpp
+6-6lldb/source/Symbol/Symtab.cpp
+6-6lldb/source/Symbol/ObjectFile.cpp
+5-6lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+5-5lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
+4-4lldb/include/lldb/Core/Module.h
+39-4111 files not shown
+60-6017 files

LLVM/project eb5d3e2 — llvm/utils/TableGen/Common CodeGenRegisters.cpp

TableGen: Skip disjoint register classes before intersecting them

inferCommonSubClass intersects the member lists of a register class
with every other class, and most pairs are disjoint. Check that with
the member bit vectors first, which avoids loading the members and
allocating the intersection.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    576               346            111
  After     573 (-0.6%)       343 (-0.7%)    110 (-0.6%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+4-0llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+4-01 files

LLVM/project bfacc3a — llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Compute register sizes once for the sub-register size check

checkSubRegIndexSizes found the size of each register by scanning every
register class for one containing it, about 18 million class membership
tests for AMDGPU. Compute the size of all registers in one pass over
the members of each register class instead, and pass it in.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    578               355            113
  After     576 (-0.2%)       345 (-2.8%)    110 (-2.4%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+26-24llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+3-2llvm/utils/TableGen/Common/CodeGenRegisters.h
+29-262 files

LLVM/project f68fa89 — llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Test register sub-classes with the member bit vectors

computeSubClasses checks whether one register class contains another
for most pairs of classes, by walking both sorted member lists. That
reads every member register, which is slow for AMDGPU's 913 classes.
Each class already has a bit vector of its members, so compare those
instead.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    596               365            117
  After     577 (-3.1%)       353 (-3.4%)    112 (-3.7%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+4-1llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+3-0llvm/utils/TableGen/Common/CodeGenRegisters.h
+7-12 files

LLVM/project 94755de — llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Skip redundant addComposite calls for secondary sub-registers

computeSecondarySubRegs calls addComposite for every index of every new
sub-register, and almost all of these calls repeat a composition that
is already known. For AMDGPU, only about 15000 of 29.8 million calls add
anything. Skip the call if the composition is known and its result has
an offset in every mode, since it would do nothing.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    603               367            116
  After     595 (-1.3%)       362 (-1.2%)    115 (-1.0%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+6-0llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+1-1llvm/utils/TableGen/Common/CodeGenRegisters.h
+7-12 files

LLVM/project 64799a3 — llvm/utils/TableGen/Common CodeGenRegisters.cpp

TableGen: Index registers by sub-register index enum value when inferring sub-classes

inferSubClassWithSubReg groups the members of a register class by each
of their sub-register indices, and looked up every index of every member
in a std::map. Sub-register indices are numbered densely, so use a
vector indexed by enum value instead. Also count the members once
instead of once per index.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    622               380            120
  After     604 (-3.0%)       367 (-3.4%)    115 (-3.7%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+12-16llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+12-161 files

LLVM/project a7ce27b — llvm/utils/TableGen RegisterInfoEmitter.cpp, llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Store super-register class sets as bit vectors

extendSuperRegClasses adds the super-register classes of each register
class's super-classes to its own, by merging their sets. The sets were
DenseSets, so most of the time went to hashing classes that were already
present.

Store the sets as bit vectors instead, so merging is a bitwise or. They
are indexed by a new CreationIndex, since EnumValue isn't assigned until
all classes have been inferred.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    700               435            135
  After     622 (-11.1%)      381 (-12.5%)   120 (-11.2%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+20-12llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+24-5llvm/utils/TableGen/Common/CodeGenRegisters.h
+1-1llvm/utils/TableGen/RegisterInfoEmitter.cpp
+45-183 files

LLVM/project 3df0f7e — llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Avoid binary searches for sub-registers of similar registers

inferMatchingSuperRegClass looks up the sub-register at one index for
every member of a register class. Members of a class almost always have
the same sub-register indices, so the index is usually at the same
position in each member's sorted array. Pass the position found in the
previous member as a hint, and only binary search if it doesn't match.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    720               442            138
  After     701 (-2.7%)       437 (-1.2%)    137 (-1.2%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+8-3llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+6-2llvm/utils/TableGen/Common/CodeGenRegisters.h
+14-52 files

LLVM/project f7a819b — llvm/utils/TableGen/Common CodeGenRegisters.h

Return conflicting compositions from addComposite immediately

Check for an existing composition up front: return a conflicting one
right away, instead of after updating B's ranges from a composition that
isn't recorded. This no longer needs the try_emplace result. The
generated code for all in-tree targets is unchanged, and the instruction
count is the same.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+13-7llvm/utils/TableGen/Common/CodeGenRegisters.h
+13-71 files

LLVM/project 215eb38 — llvm/utils/TableGen/Common CodeGenRegisters.h

TableGen: Look up sub-register index compositions in an array

compose() looked up each composition in a std::map. It is called for
every super-register class set in extendSuperRegClasses, and by
addComposite. Sub-register indices are numbered densely, so also keep
each index's compositions in an array indexed by enum value. For
AMDGPU's 400 indices this is about 1 MB.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    746               474            148
  After     721 (-3.4%)       446 (-6.1%)    139 (-5.8%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+13-6llvm/utils/TableGen/Common/CodeGenRegisters.h
+13-61 files

LLVM/project c9f21d9 — llvm/utils/TableGen/Common CodeGenRegisters.h

Reword the hasSuperRegClass comment to match the other overload

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-1llvm/utils/TableGen/Common/CodeGenRegisters.h
+2-11 files

LLVM/project fef84fc — llvm/utils/TableGen RegisterBankEmitter.cpp, llvm/utils/TableGen/Common CodeGenRegisters.h CodeGenRegisters.cpp

TableGen: Skip classes without matching super-register classes in RegisterBankEmitter

visitRegisterBankClasses checks every sub-register index for every pair
of register classes. Skip the per-index loop if RC is not in any of the
class's super-register class sets.

AMDGPU tablegen run for AMDGPUGenRegisterBank.inc:

            Gigacycles     CPU seconds
  Before    51.7           16.0
  After     48.4 (-6.4%)   14.9 (-6.9%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+6-0llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+3-0llvm/utils/TableGen/RegisterBankEmitter.cpp
+3-0llvm/utils/TableGen/Common/CodeGenRegisters.h
+12-03 files

LLVM/project 67a773d — llvm/utils/TableGen/Common CodeGenRegisters.cpp

TableGen: Insert super-register class sets in one step (#232816)

extendSuperRegClasses added each super-register class to the composed
index's set with a separate addSuperRegClass call, which looks up the
set in the DenseMap every time. Look up the set once and insert the
whole range.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    800               491            154
  After     758 (-5.3%)       482 (-1.7%)    151 (-1.9%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+1-2llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+1-21 files

LLVM/project aeb1582 — llvm/utils/TableGen/Common CodeGenRegisters.h

TableGen: Return early from addComposite for known compositions (#232815)

computeComposites calls addComposite for each pair of sub-registers of
every register with a distinct sub-register structure, so most calls
repeat a composition that is already known. Each call still did three
std::map lookups per hardware mode to update the sub-register ranges.
If the composition already exists and its result has an offset in every
mode, the rest of the function has no effect, so return early. Cache
whether the result has an offset in every mode, since offsets are never
cleared once set.

AMDGPU tablegen runs that build the register bank:

            Gigainstructions  Gigacycles     CPU seconds
  Before    918               541            169
  After     800 (-12.8%)      491 (-9.3%)    154 (-8.8%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+21-1llvm/utils/TableGen/Common/CodeGenRegisters.h
+21-11 files

LLVM/project f1621eb — libcxx/docs ReleaseNotes.rst

[libc++][docs] Remove stale release notes from toctree (#234792)

#234169 deleted the release notes for LLVM 20, 21 and 22 but left them
listed in the hidden toctree in `ReleaseNotes.rst`. This results in
Sphinx doc build warnings, which show up as permerge failures.

Remove the three stale toctree entries to fix the doc build warnings.

LLM-aided
DeltaFile
+0-3libcxx/docs/ReleaseNotes.rst
+0-31 files

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

SelectionDAG: Build FP immediates from integer bits in the legalizer

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 624b895 — llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify implied-nonneg-from-unsigned-bound.ll implied-nonneg-from-unsigned-bound-swapped.ll

[SCEV] Derive x >=s 0 from x <u y and y <=u 2^(n-1) (#231631)

Let `n` be the bit width of `x` and `y`.  
If `x <u y` and `y <=u 2^(n-1)`, then `x <u 2^(n-1)`, so `x >=s 0`.  
Here `y <=u 2^(n-1)` means `y >=s 0` or `y == INT_MIN`.  
In the same way, if `x <=u y` and `y <u 2^(n-1)`, then `x >=s 0`.

This lets a guard like `x <u len` prove `x >=s 0` when `len` is
non-negative.

First, we prove the `x >=s 0` fact, and then try to imply the fact that
SCEV was asked about from this fact.
This is to allow implication of weaker bounds, e.g. `x >=s c, c <= 0`.

`y` is checked via ranges only, to keep compile time low.

Alive2 check - [link](https://alive2.llvm.org/ce/z/RScq69).

---------

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+1,185-0llvm/test/Transforms/IndVarSimplify/implied-nonneg-from-unsigned-bound-swapped.ll
+275-0llvm/test/Transforms/IndVarSimplify/implied-nonneg-from-unsigned-bound.ll
+21-0llvm/lib/Analysis/ScalarEvolution.cpp
+1,481-03 files

LLVM/project 09d21f1 — llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Prove signed/unsigned implications in either operand order (#234208)

SCEV could prove these implications only with the operands in the same
order:
- If `a <u b` and `a`, `b` have the same sign, then `a <s b`.
- If `a <s b` and `a`, `b` have the same sign, then `a <u b`.
- If `a <u b` and `b >=s 0`, then `a <s b`.
- If `a <s b` and `b <s 0`, then `a <u b`.

For example, it proved `a <s b` from `a <u b` and `b >=s 0`, but not `b
>s a`.

Now it proves them in either order.

---------

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+149-0llvm/test/Transforms/IndVarSimplify/implied-cond-different-signedness.ll
+46-40llvm/lib/Analysis/ScalarEvolution.cpp
+8-0llvm/include/llvm/Analysis/ScalarEvolution.h
+203-403 files

LLVM/project 1ebe9b9 — mlir/lib/Conversion/GPUCommon GPUToLLVMConversion.cpp, mlir/test/Conversion/GPUCommon lower-alloc-to-gpu-runtime-calls.mlir

[mlir][gpu] Fix address space casts in gpu.alloc/gpu.dealloc lowering (#234394)
DeltaFile
+19-0mlir/test/Conversion/GPUCommon/lower-alloc-to-gpu-runtime-calls.mlir
+6-1mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
+25-12 files

LLVM/project 6aaeed0 — llvm/lib/Target/LoongArch LoongArchMergeBaseOffset.cpp, llvm/test/CodeGen/LoongArch merge-base-offset-fold-large-offset-debug.mir

[LoongArch] Ignore debug uses when folding large offsets (#230290)

A `DBG_VALUE` can currently make `foldLargeOffset` reject an otherwise
foldable offset because the pass uses `hasOneUse()`. As a result,
equivalent MIR with and without debug information can produce different
instruction sequences.

Use `hasOneNonDBGUse()` for the profitability check. Since the fold
erases the offset-producing instructions, mark their debug users undef
before erasing them.

The new MIR test covers the case where a large offset has one ordinary
use and one debug use. Without the change, the offset remains
materialized with `LU12I_W` and `ADD_W`; with the change, it is folded
into `PCADDU12I` and `ADDI_W`, and the invalidated `DBG_VALUE` uses
`$noreg`. The checks were generated with
`utils/update_mir_test_checks.py`.

Tests: `check-llvm-codegen-loongarch` (958 passed), `git clang-format

    [3 lines not shown]
DeltaFile
+46-0llvm/test/CodeGen/LoongArch/merge-base-offset-fold-large-offset-debug.mir
+5-2llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+51-22 files

LLVM/project 2d70540 — polly/docs conf.py HowToManuallyUseTheIndividualPiecesOfPolly.md

[Polly][docs] Finish MyST migration for selected docs

Clean up the rst2myst output for the seven selected Polly docs so that they
render the same as the reST originals.

LLM-aided
DeltaFile
+18-9polly/docs/ReleaseNotes.md
+10-14polly/docs/UsingPollyWithClang.md
+4-4polly/docs/TipsAndTricks.md
+1-5polly/docs/Performance.md
+2-3polly/docs/HowToManuallyUseTheIndividualPiecesOfPolly.md
+1-0polly/docs/conf.py
+36-356 files

LLVM/project f22042f — utils/bazel/llvm-project-overlay/libc BUILD.bazel

[BAZEL] Fix one more libc bazel build failure. (#234790)

The previous PR (https://github.com/llvm/llvm-project/pull/234776)
missed one place that needed to be updated.
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project 8ff89cf — libcxx/docs ReleaseNotes.rst

[libc++][docs] Remove stale release notes from toctree

#234169 deleted the release notes for LLVM 20, 21 and 22 but left them
listed in the hidden toctree in ReleaseNotes.rst. Sphinx reports each
as a nonexisting document, which fails the documentation build because
warnings are errors.

LLM-aided
DeltaFile
+0-3libcxx/docs/ReleaseNotes.rst
+0-31 files

LLVM/project 03608cf — .github/workflows libcxx-lnt-anchor-commits.yml libcxx-benchmark-cron.yml, libcxx/utils/ci/lnt README.md machines.json

[libc++] Request refinement commits from the benchmark cron job (#234739)

This closes the loop for automatic refinement of benchmark data. It adds
a CI job that determines which commits to bisect based on the
changepoints we find in the existing data, and incorporates them into
the set of commits to measure.

The result is that we automatically bisect commits between which a
significant changepoint is detected.

Assisted by Claude
DeltaFile
+129-0.github/workflows/libcxx-lnt-refine-commits.yml
+78-49.github/workflows/libcxx-benchmark-cron.yml
+97-0.github/workflows/libcxx-lnt-anchor-commits.yml
+6-3libcxx/utils/ci/lnt/machines.json
+3-1libcxx/utils/ci/lnt/README.md
+313-535 files

LLVM/project 8c63891 — llvm/docs conf.py

[docs] Enable absolute LLVM documentation link checks (#222508)

Enable the absolute documentation URL warning for the LLVM Sphinx docs
build.

Part of #214861
DeltaFile
+11-1llvm/docs/conf.py
+11-11 files