LLVM/project 1ac9b99lldb/source/Plugins/ScriptInterpreter/Python ScriptInterpreterPython.cpp PythonDataObjects.h, lldb/test/API/commands/register/register_command TestRegisters.py

[lldb] Reimplement PythonCallable::GetArgInfo without executing Python code (#213378)

`b05a5d0a` added an arity-trimming step to the shared
`ScriptedPythonInterface::Dispatch`: extensions are now allowed to
define methods with trailing parameters as optional
(`num_children(self)` vs. `num_children(self, max_count)`), so before
calling into a method, `Dispatch` needs to know how many positional
arguments it actually accepts and drop any trailing ones we'd otherwise
pass.

That check calls `PythonCallable::GetArgInfo`, which ran a whole
embedded Python script through `inspect.signature` on every call, since
every scripted-extension dispatch goes through it.

For the common case `GetArgInfo()` actually needs to handle fast (plain
Python functions/methods, classes used as constructors, and callable
instances defining `__call__`, i.e. everything `Dispatch<T>()` and
`CreatePluginObject()` ever pass it), the answer is available as plain
data attributes, with no Python bytecode execution required:

    [15 lines not shown]
DeltaFile
+101-7lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+36-1lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+9-0lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+8-0lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+0-1lldb/test/API/commands/register/register_command/TestRegisters.py
+154-95 files

LLVM/project aaabd24llvm/lib/Target/AMDGPU SILowerSGPRSpills.cpp, llvm/test/CodeGen/AMDGPU wwm-regalloc-error.ll sgpr-spill-vmem-large-frame.mir

[AMDGPU] Support partial and empty WWM pools for SGPR spills

SGPR lane spilling currently treats the WWM VGPR pool as all-or-nothing. This
can fail compilation when the requested pool cannot be formed, even though
scratch spilling or a smaller spillable pool could make progress.

This PR lets ordinary SGPR spills fall back to scratch when the pool is empty
and lets WWM register allocation use a nonempty partial pool. It keeps the
full-pool requirement for strict WWM/WQM and explicit spill-carrier
preallocation.

The no-pool fallback is recorded in SIMachineFunctionInfo so frame lowering can
provide enough emergency scavenging slots. The state is also serialized to
preserve the behavior across MIR round trips.
DeltaFile
+213-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-memory-fallback.ll
+95-49llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
+101-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-preallocation-guard.mir
+50-0llvm/test/CodeGen/AMDGPU/wwm-regalloc-partial-pool.mir
+36-0llvm/test/CodeGen/AMDGPU/sgpr-spill-vmem-large-frame.mir
+17-3llvm/test/CodeGen/AMDGPU/wwm-regalloc-error.ll
+512-526 files not shown
+549-6112 files

LLVM/project 11038ccllvm/include/llvm/CodeGen MachinePipeliner.h TargetInstrInfo.h, llvm/lib/CodeGen MachinePipeliner.cpp

Revert "[llvm][AArch64] Add pipeliner remarks" (#213485)

Reverts llvm/llvm-project#213157

Reverting to fix build bots.
DeltaFile
+0-168llvm/test/CodeGen/AArch64/sms-analyzeloop-remarks.mir
+12-94llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-83llvm/test/CodeGen/AArch64/sms-schedule-remark.mir
+3-22llvm/lib/CodeGen/MachinePipeliner.cpp
+2-6llvm/include/llvm/CodeGen/TargetInstrInfo.h
+0-6llvm/include/llvm/CodeGen/MachinePipeliner.h
+17-37913 files not shown
+32-41719 files

LLVM/project d21e392llvm/test/CodeGen/AMDGPU llc-pipeline.ll, llvm/test/CodeGen/ARM O3-pipeline.ll

add extra cycle analyses from MachineLICM not preserving CI

Created using spr 1.3.8-wip
DeltaFile
+11-0llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
+2-0llvm/test/CodeGen/X86/opt-pipeline.ll
+2-0llvm/test/CodeGen/ARM/O3-pipeline.ll
+1-0llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+1-0llvm/test/CodeGen/RISCV/O3-pipeline.ll
+1-0llvm/test/CodeGen/PowerPC/O3-pipeline.ll
+18-03 files not shown
+21-09 files

LLVM/project 41ededallvm/include/llvm/Analysis BlockFrequencyInfoImpl.h, llvm/lib/CodeGen MachineBlockFrequencyInfo.cpp LazyMachineBlockFrequencyInfo.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+53-30llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
+19-19llvm/test/CodeGen/AArch64/late-taildup-computed-goto.ll
+12-25llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
+16-20llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
+12-11llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+8-14llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+120-11939 files not shown
+240-25645 files

LLVM/project dbe7da3utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 350089d (#213482)

This fixes 350089d0cb1652e6ff44888f46d6487db5e696e6 (#213456).

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

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project e3bde09mlir/include/mlir-c IR.h, mlir/lib/CAPI/IR IR.cpp

[mlir-c] Add structural operation equivalence (#206537)

Exposes `OperationEquivalence` through the MLIR C API so callers can compare operations structurally rather than by handle identity.

Assisted by: Claude
DeltaFile
+183-0mlir/test/CAPI/ir.c
+38-1mlir/include/mlir-c/IR.h
+19-0mlir/lib/CAPI/IR/IR.cpp
+240-13 files

LLVM/project ca9e76bllvm/include/llvm/CodeGen MachinePipeliner.h TargetInstrInfo.h, llvm/lib/CodeGen MachinePipeliner.cpp

Revert "[llvm][AArch64] Add pipeliner remarks (#213157)"

This reverts commit 25aec49d40d52ab730d360fc362ecd8b46e00db5.
DeltaFile
+0-168llvm/test/CodeGen/AArch64/sms-analyzeloop-remarks.mir
+12-94llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-83llvm/test/CodeGen/AArch64/sms-schedule-remark.mir
+3-22llvm/lib/CodeGen/MachinePipeliner.cpp
+2-6llvm/include/llvm/CodeGen/TargetInstrInfo.h
+0-6llvm/include/llvm/CodeGen/MachinePipeliner.h
+17-37913 files not shown
+32-41719 files

LLVM/project 84afdb4lld/MachO InputSection.cpp, lld/test/MachO icf-scale-same-class.s

[lld][MachO] Avoid quadratic iteration over already-folded symbols during ICF (#213339)

`ConcatInputSection::foldIdentical()` clears the folded functions
`originalUnwindEntry`.
However, it cleared every symbol: with N members, the repeated clearing
is **O(N²)**.
This is redundant: we should only remove the incoming `copy->symbols`.

This patch moves the removing loop ahead and adds more clear comments on
why we need to skip the first element.
Also added a new `lld/test/MachO/icf-scale-same-class.s` with 500K
identical functions as a stress test, which would've taken minutes to
link, and less than a second with the patch.

Testing on real-world app (IRPGO instrumentation + ICF) find that we
achieved a 19x speed up (1:14:42 -> 3:55)
DeltaFile
+37-0lld/test/MachO/icf-scale-same-class.s
+10-6lld/MachO/InputSection.cpp
+47-62 files

LLVM/project 89acefdclang/include/clang/Basic BuiltinsAMDGPU.td, clang/test/Sema builtins-amdgcn-d16-image-16bit-error.c

clang/AMDGPU: Require 16-bit-insts for half typed image builtins

Typed image load/store operations with 16-bit elements require d16
support which was introduced in gfx8. They were previously gated only
on image-insts, so they were wrongly accepted on targets that have
images but lack 16-bit support (e.g. gfx700), where the backend then
fails to select.

Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-0clang/test/Sema/builtins-amdgcn-d16-image-16bit-error.c
+24-24clang/include/clang/Basic/BuiltinsAMDGPU.td
+83-242 files

LLVM/project b03b97bclang/include/clang/Basic BuiltinsAMDGPU.td, clang/lib/Sema SemaAMDGPU.cpp

clang/AMDGPU: Require 16-bit-insts for half typed buffer format builtins

Typed buffer format load/store operations with 16-bit elements require
d16 support which was introduced in gfx8. These builtins previously had
no required features at all, so they were accepted (and then crashed the
backend) on targets without 16-bit support.

Diagnose these in Sema, parallel to the image builtins. The manual
verification here suprised me. The automatic builtin feature verification
is enforced in codegen, which seems like a layering violation which
should be fixed.

Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+19-0clang/test/Sema/builtins-amdgcn-d16-buffer-format-16bit-error.c
+14-0clang/lib/Sema/SemaAMDGPU.cpp
+4-4clang/include/clang/Basic/BuiltinsAMDGPU.td
+1-1clang/test/SemaHIP/builtins-amdgcn-buffer-format.hip
+1-1clang/test/CodeGenOpenCL/builtins-amdgcn-struct-buffer-store-format.cl
+1-1clang/test/CodeGenOpenCL/builtins-amdgcn-struct-buffer-load-format.cl
+40-73 files not shown
+43-109 files

LLVM/project 6ca4be6clang/include/clang/Basic OffloadArch.h, clang/lib/Basic Cuda.cpp

clang: Replace Is*OffloadArch free functions with OffloadArch methods

Drop the IsNVIDIAOffloadArch/IsAMDOffloadArch/IsIntel*OffloadArch free
functions in favor of the OffloadArch member predicate functions.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+29-19clang/unittests/Basic/OffloadArchTest.cpp
+6-6clang/lib/Driver/Driver.cpp
+0-9clang/include/clang/Basic/OffloadArch.h
+4-4clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+2-2clang/lib/Basic/Cuda.cpp
+1-1clang/lib/Driver/ToolChains/Clang.cpp
+42-411 files not shown
+43-427 files

LLVM/project 2782614llvm/lib/Analysis InstructionSimplify.cpp ConstantFolding.cpp, llvm/test/Transforms/LoopVectorize constantfolder.ll interleaved-accesses-requiring-scev-predicates.ll

[InstSimplify] Defer to ConstantFold in simplifyInstrinsic (#205061)

Defer to ConstantFolding on all-constant operands, in
llvm::simplifyIntrinsic. The patch adds a context-function argument to
ConstantFoldIntrinsic for strictfp information, which is used by a new
canConstantFoldIntrinsic under canConstantFoldCallTo: it was
necessitated by exposing the constant-folder via
llvm::simplifyIntrinsic. The patch only has impact on passes that use
simplifyIntrinsic via InstSimplifyFolder, other than InstCombine, which
already constant-folds intrinsics.
DeltaFile
+68-142llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+30-34llvm/test/Transforms/LoopVectorize/interleaved-accesses-requiring-scev-predicates.ll
+40-20llvm/lib/Analysis/ConstantFolding.cpp
+37-2llvm/test/Transforms/LoopVectorize/constantfolder.ll
+2-13llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
+7-0llvm/lib/Analysis/InstructionSimplify.cpp
+184-2113 files not shown
+189-2169 files

LLVM/project 7c64aeacompiler-rt/cmake/Modules CompilerRTUtils.cmake

[compiler-rt][cmake] filter libc-backed builtins superseded by assembly
DeltaFile
+2-0compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+2-01 files

LLVM/project 8cb8e87llvm/test/tools/llubi gep-16-bit-addrspace.ll, llvm/tools/llubi/lib Context.cpp

[llubi]  Truncate struct field offsets exceeding the pointer index width (#213471)

Update computeGEP to implicitly truncate struct field offsets. This
fixes crashes in the new test, where the field offset does not fit in
the index width.

Related https://github.com/llvm/llvm-project/pull/213436

PR: https://github.com/llvm/llvm-project/pull/213471
DeltaFile
+18-0llvm/test/tools/llubi/gep-16-bit-addrspace.ll
+2-1llvm/tools/llubi/lib/Context.cpp
+20-12 files

LLVM/project 4671437libc/src/__support/math expm1.h tan.h

[libc] Add missing LIBC_INLINE to functions defined in .h files (#213442)
DeltaFile
+3-2libc/src/__support/math/tan.h
+2-2libc/src/__support/math/expm1.h
+5-42 files

LLVM/project 350089dlibc/src/__support common.h

[libc] Fix LLVM_LIBC_FUNCTION on 32-bit x86 Windows (#213456)

Previously, trying to compile libm with LIBC_COPT_PUBLIC_PACKAGING
defined failed on 32-bit Windows with

    error: alias must point to a defined variable or function

This is because 32-bit Windows adds a leading underscore to __cdecl C
functions, making the alias declaration not find its target symbol name.
The same problem exists on Apple platforms, which as solution don't emit
the alias for the C++ LIBC_NAMESPACE:: symbol.

Do the same on 32-bit Windows as on Apple platforms: Emit only
the underscore-prefixed symbol, not the LIBC_NAMESPACE:: alias.
DeltaFile
+17-14libc/src/__support/common.h
+17-141 files

LLVM/project 004ebf7llvm/test/TableGen RegClassByHwMode.td, llvm/utils/TableGen AsmMatcherEmitter.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+5-1llvm/utils/TableGen/AsmMatcherEmitter.cpp
+1-1llvm/test/TableGen/RegClassByHwMode.td
+6-22 files

LLVM/project 007c684mlir/include/mlir/Dialect/XeGPU/IR XeGPUAttrs.td XeGPUOps.td, mlir/lib/Dialect/XeGPU/IR XeGPUOps.cpp

[mlir][xegpu] Add xegpu.lane_shuffle op (#210777)

Add a lane-level XeGPU operation that re-distributes a subgroup's
fragments across its lanes without changing the element type.

The op takes a 1D vector — the fragment held by one lane — and returns a
fragment of the same type. A pack/unpack mode selects the direction:
viewing the subgroup as an S x N element grid (S = subgroup size, N =
elements per lane), pack moves element j of lane i from logical position
j*S + i to i*N + j, so a lane's elements end up at consecutive
positions; unpack is the reverse.
  
This implements xegpu.convert_layout semantics at the lane level when
lane_layout is unchanged but lane_data differs.
  
assisted-by-claude

---------

Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>
DeltaFile
+72-0mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
+42-0mlir/test/Dialect/XeGPU/ops.mlir
+36-0mlir/test/Dialect/XeGPU/canonicalize.mlir
+23-0mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+21-0mlir/include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td
+7-0mlir/test/Dialect/XeGPU/invalid.mlir
+201-01 files not shown
+204-07 files

LLVM/project cfd7f8blibc/test/shared shared_builtins_test.cpp

fix conflicts
DeltaFile
+2-5libc/test/shared/shared_builtins_test.cpp
+2-51 files

LLVM/project 1984097compiler-rt/lib/builtins comparetf2.cpp, libc/shared/builtins unordtf2.h letf2.h

[compiler-rt][builtins] libc-backed quad-float comparison builtins
DeltaFile
+49-0compiler-rt/lib/builtins/comparetf2.cpp
+36-0libc/src/__support/builtins/letf2.h
+36-0libc/src/__support/builtins/unordtf2.h
+36-0libc/src/__support/builtins/getf2.h
+35-0libc/shared/builtins/unordtf2.h
+35-0libc/shared/builtins/letf2.h
+227-06 files not shown
+321-012 files

LLVM/project 01d882acompiler-rt/lib/builtins comparedf2.cpp, libc/shared/builtins ledf2.h unorddf2.h

[compiler-rt][builtins] libc-backed double-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparedf2.cpp
+30-0libc/src/__support/builtins/gedf2.h
+30-0libc/src/__support/builtins/ledf2.h
+30-0libc/src/__support/builtins/unorddf2.h
+29-0libc/shared/builtins/ledf2.h
+29-0libc/shared/builtins/unorddf2.h
+202-06 files not shown
+280-012 files

LLVM/project 63d6e8dcompiler-rt/lib/builtins comparesf2.cpp, libc/shared/builtins lesf2.h unordsf2.h

[compiler-rt][builtins] libc-backed single-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparesf2.cpp
+30-0libc/src/__support/builtins/unordsf2.h
+30-0libc/src/__support/builtins/lesf2.h
+30-0libc/src/__support/builtins/gesf2.h
+29-0libc/shared/builtins/lesf2.h
+29-0libc/shared/builtins/unordsf2.h
+202-06 files not shown
+280-012 files

LLVM/project 8fd4c22libc/src/__support/builtins CMakeLists.txt cmp_helper.h

[libc][builtins] add cmp_helper for compiler-rt soft-float comparisons
DeltaFile
+63-0libc/src/__support/builtins/cmp_helper.h
+7-0libc/src/__support/builtins/CMakeLists.txt
+70-02 files

LLVM/project e2564f0libc/src/__support/builtins cmp_helper.h

fix format
DeltaFile
+2-2libc/src/__support/builtins/cmp_helper.h
+2-21 files

LLVM/project 6545f29llvm/lib/IR Operator.cpp, llvm/test/Transforms/ConstraintElimination gep-struct-offset-index-width.ll

[IR] Truncate struct field offsets exceeding the pointer index width. (#213436)

Update accumulateConstantOffset and collectOffset to implicitly truncate
struct field offsets. This fixes crashes in the new tests, where the
field offset does not fit in the index width.

PR: https://github.com/llvm/llvm-project/pull/213436
DeltaFile
+31-0llvm/test/Transforms/ConstraintElimination/gep-struct-offset-index-width.ll
+28-0llvm/test/Transforms/InstCombine/gep-struct-offset-index-width.ll
+6-4llvm/lib/IR/Operator.cpp
+65-43 files

LLVM/project bd9aa3clld/ELF Config.h Writer.cpp, lld/test/ELF ppc64-long-branch-rel14.s ppc64-pcrel-call-to-pcrel.s

[ELF] Retain .rela.dyn for PPC64 PI long-branch thunks (#212078)

PPC64PILongBranchThunk adds a relative relocation, which runs after
removeUnusedSyntheticSections. With no other dynamic relocation
.rela.dyn is incorrectly removed.

Extract the .rela.auth.dyn condition (#96496, #195649) to `mayGrowLate`
and add a .branch_lt check.
DeltaFile
+22-10lld/ELF/Writer.cpp
+10-10lld/test/ELF/ppc64-pcrel-call-to-pcrel.s
+10-1lld/test/ELF/ppc64-long-branch-rel14.s
+4-0lld/ELF/Config.h
+46-214 files

LLVM/project ce1c15aflang/include/flang/Parser parse-tree.h, flang/lib/Lower/OpenMP Clauses.cpp

[flang][OpenMP] Version-dependent parsing of map-type-modifier

Up until 5.2, ALWAYS, CLOSE, and PRESENT were keywords of the
map-type-modifier. Starting from 6.0 they all became their own
single-keyword modifiers. This allowed specifying them together,
unlike in the past where map-type-modifier was unique.

To avoid using a single representation of the modifiers, and be
able to validate them through non-conditional properties, the
AST was rewritten back to the older form in canonicalization
when the spec version was set to 5.2 or earlier.

Now that the parser is version-aware, it can generate the desired
AST from the start.

Additionally, extract the OMPX_HOLD modifier out of the map-type-
modifier into its own AST node regardless of version.
DeltaFile
+62-19flang/lib/Parser/openmp-parsers.cpp
+1-45flang/lib/Semantics/canonicalize-omp.cpp
+7-7flang/test/Parser/OpenMP/map-modifiers-v60.f90
+4-4flang/test/Parser/OpenMP/map-modifiers.f90
+1-2flang/include/flang/Parser/parse-tree.h
+0-1flang/lib/Lower/OpenMP/Clauses.cpp
+75-786 files

LLVM/project cf5e882flang/include/flang/Parser parsing.h user-state.h, flang/lib/Frontend FrontendAction.cpp ParserActions.cpp

[flang] Pass LangOptions to parser via UserState

This will help deal with syntax changes across different versions of
OpenMP. There are certain cases where being able to generate different
AST for the same source code depending on the version of the OpenMP
spec makes semantic analysis easier.
DeltaFile
+8-0flang/include/flang/Parser/user-state.h
+4-2flang/lib/Parser/parsing.cpp
+4-2flang/lib/Frontend/ParserActions.cpp
+3-1flang/lib/Frontend/FrontendAction.cpp
+3-1flang/include/flang/Parser/parsing.h
+1-1flang/lib/Semantics/mod-file.cpp
+23-71 files not shown
+24-87 files

LLVM/project 6dfd733lldb/source/Plugins/Platform/Windows PlatformWindows.cpp

[lldb][Windows] Improve error messages in PlatformWindows.cpp (#213011)

The reason for the failure is known but is not in the log. Add a helper
function to map the error to a string and log it.

---------

Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
DeltaFile
+10-2lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+10-21 files