LLVM/project be25717llvm/lib/Target/Xtensa XtensaISelLowering.cpp, llvm/test/CodeGen/Xtensa inline-asm-constraints.ll inline-asm-invalid.ll

[Xtensa] Support 'f' Inline Assembly Constraint (#202345)

This adds the 'f' inline assembly constraint, as supported by GCC. An
'f'-constrained operand is passed in a floating point register.
DeltaFile
+22-0llvm/test/CodeGen/Xtensa/inline-asm-constraints.ll
+4-5llvm/test/CodeGen/Xtensa/inline-asm-invalid.ll
+8-0llvm/lib/Target/Xtensa/XtensaISelLowering.cpp
+34-53 files

LLVM/project c6bb072clang/lib/AST StmtPrinter.cpp, clang/test/OpenMP parallel_ast_print.cpp declare_reduction_ast_print.cpp

[Clang] Don't print extra whitespace for comma expression in StmtPrinter (#210920)

For binary expression `1, 2`, StmtPrinter used to print it as `1 , 2`
which doesn't look very pretty.
DeltaFile
+26-28clang/unittests/AST/StmtPrinterTest.cpp
+4-4clang/test/SemaTemplate/instantiate-requires-expr.cpp
+8-0clang/lib/AST/StmtPrinter.cpp
+3-3clang/test/SemaTemplate/instantiate-requires-clause.cpp
+2-2clang/test/OpenMP/parallel_ast_print.cpp
+2-2clang/test/OpenMP/declare_reduction_ast_print.cpp
+45-392 files not shown
+47-418 files

LLVM/project 46e8d53llvm/test/CodeGen/X86 sse3-avx-addsub.ll sse3-avx-addsub-2.ll, llvm/test/Transforms/PhaseOrdering/X86 addsub-inseltpoison.ll addsub.ll

[X86] Synchronise middle and backend test coverage for ADDSUBPS/PD patterns (#210919)

Use the same test names wherever possible and ensure sse3-avx-addsub.ll
has test coverage for the IR emitted by the middle-end (no matter how
poor it is)

Prep work for #144489 (sse3-avx-addsub-2.ll will be deleted along with
lowerToAddSubOrFMAddSub)
DeltaFile
+230-44llvm/test/CodeGen/X86/sse3-avx-addsub.ll
+38-38llvm/test/CodeGen/X86/sse3-avx-addsub-2.ll
+4-4llvm/test/Transforms/PhaseOrdering/X86/addsub-inseltpoison.ll
+4-4llvm/test/Transforms/PhaseOrdering/X86/addsub.ll
+276-904 files

LLVM/project b227ed7lldb/docs index.md, lldb/docs/resources addingtargetsupport.md

[lldb][docs] Add platform/target support requirements doc (#207166)

This is a very delayed follow up to:

https://discourse.llvm.org/t/rfc-surveying-lldbs-supported-platforms-and-architectures/83978

Where I realised that even for upstream supported targets, the level of
testing and attention they get varies a lot. Which I think is not a bad
thing, because LLDB would be much more chaotic if it were a bad thing.

The problem I see is that no one really knows how to start writing
proposals for new targets, and no one really knows how to properly
assess one.

Me included, but what I can do is write out some starting points for
both parties. Hopefully this makes the process a bit more fair for those
not used to writing RFCs.

(and if we want to make the rules more strict, we will now have a place

    [22 lines not shown]
DeltaFile
+300-0lldb/docs/resources/addingtargetsupport.md
+1-0lldb/docs/index.md
+301-02 files

LLVM/project 4c16c1bflang/include/flang/Optimizer/Transforms Passes.td, flang/lib/Optimizer/Passes CommandLineOpts.cpp

[flang] Remove legacy stack-arrays and memory-allocation-opt passes

The unified allocation-placement pass now supersedes both the heap-to-stack
stack-arrays pass and the stack-to-heap memory-allocation-opt pass, and is the
default in the FIR optimizer pipeline. Remove the two legacy passes: their
TableGen definitions, the MemoryAllocation.cpp source, the memory-allocation-opt
command-line options, the enable-allocation-placement fallback switch, and the
addMemoryAllocationOpt pipeline helper. The pass-only portions of
StackArrays.cpp are dropped while its analysis and rewrite pattern, now shared
with allocation-placement, are kept.

The legacy tests are retargeted onto allocation-placement to show it reproduces
both prior behaviors: the stack-arrays tests use "stack-arrays=true", and the
memory-allocation-opt tests use the default policy (runtime-sized and big
constant-size temporaries go on the heap).
DeltaFile
+0-150flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
+0-71flang/lib/Optimizer/Transforms/StackArrays.cpp
+0-28flang/include/flang/Optimizer/Transforms/Passes.td
+0-22flang/lib/Optimizer/Passes/CommandLineOpts.cpp
+12-5flang/test/Fir/memory-allocation-opt.fir
+5-11flang/test/Fir/allocation-placement-pipeline.fir
+17-28713 files not shown
+33-32919 files

LLVM/project 11640c8flang/include/flang/Optimizer/Passes CommandLineOpts.h Pipelines.h, flang/lib/Optimizer/Passes CommandLineOpts.cpp Pipelines.cpp

[flang] Wire allocation-placement into the optimizer pipeline (experimental)

Add a hidden -enable-allocation-placement flag that, when set, replaces the
stack-arrays and memory-allocation-opt passes in the default FIR optimizer
pipeline with the unified allocation-placement pass. The flag is off by
default, so the legacy passes remain the default path and behavior is
unchanged.

When enabled, the pass runs with its default byte-size thresholds; the
-fstack-arrays strategy is forwarded through the new stackArrays option.
DeltaFile
+21-0flang/test/Fir/allocation-placement-pipeline.fir
+16-0flang/lib/Optimizer/Passes/CommandLineOpts.cpp
+12-0flang/include/flang/Optimizer/Passes/CommandLineOpts.h
+11-1flang/lib/Optimizer/Passes/Pipelines.cpp
+2-2flang/lib/Optimizer/Transforms/AllocationPlacement.cpp
+2-0flang/include/flang/Optimizer/Passes/Pipelines.h
+64-36 files

LLVM/project cbf4a63flang/docs fstack-arrays.md, flang/include/flang/Optimizer/Passes CommandLineOpts.h

[flang] Enable allocation-placement pass by default

Make the unified allocation-placement pass the default in the FIR optimizer
pipeline in place of the legacy stack-arrays and memory-allocation-opt passes,
by defaulting -enable-allocation-placement to true. Passing
-enable-allocation-placement=false restores the legacy passes for comparison.

Add a -disable-allocation-placement switch that skips the pass entirely (wired
through addAllocationPlacement like the other optimizer passes), so codegen
tests can opt out of placement policy independently of the legacy fallback.

Update the pipeline-dump tests to expect AllocationPlacement, and disable the
pass in the alloca/allocmem codegen tests (alloc.fir, coordinateof.fir) so they
keep testing lowering rather than placement policy. Document the unified pass,
its policy, thresholds, and options in fstack-arrays.md.
DeltaFile
+64-0flang/docs/fstack-arrays.md
+10-3flang/lib/Optimizer/Passes/CommandLineOpts.cpp
+8-5flang/lib/Optimizer/Passes/Pipelines.cpp
+6-6flang/test/Fir/allocation-placement-pipeline.fir
+6-2flang/include/flang/Optimizer/Passes/CommandLineOpts.h
+4-2flang/test/Fir/alloc.fir
+98-185 files not shown
+104-2311 files

LLVM/project baf2adbflang/include/flang/Optimizer/Transforms AllocationPlacementPolicy.h Passes.td, flang/lib/Optimizer/Transforms AllocationPlacement.cpp

[flang] Add policy-driven allocation-placement pass

Introduce a new function-level pass, allocation-placement, that unifies the
stack/heap placement decisions currently split between the stack-arrays and
memory-allocation-opt passes. For each array allocation it consults a policy
to decide whether it should live on the stack (fir.alloca) or the heap
(fir.allocmem) and rewrites it accordingly, reusing fir::replaceAllocas for
stack-to-heap and the StackArrays analysis/rewrite for heap-to-stack (so
heap-to-stack only happens where it is provably safe).

The default policy (AllocationPlacementPolicy.h) is threshold-driven:
  - small constant-size arrays go on the stack within a per-function stack
    budget, otherwise on the heap;
  - big constant-size arrays: user variables stay on the stack, temporaries
    go on the heap;
  - runtime-sized arrays go on the heap;
  - an aggressive mode places all arrays on the stack (best effort).
User variables are distinguished from compiler temporaries via the presence
of a uniqued name. A hook lets downstream users override the thresholds per

    [4 lines not shown]
DeltaFile
+324-0flang/lib/Optimizer/Transforms/AllocationPlacement.cpp
+90-0flang/include/flang/Optimizer/Transforms/AllocationPlacementPolicy.h
+84-0flang/test/Transforms/allocation-placement.fir
+29-0flang/test/Transforms/allocation-placement-budget.fir
+26-0flang/include/flang/Optimizer/Transforms/Passes.td
+24-0flang/test/Transforms/allocation-placement-stack-arrays-mode.fir
+577-02 files not shown
+586-08 files

LLVM/project 818fd11llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AArch64 merge-loads-feeding-as-shuffleops.ll

[SelectionDAG] Merge consecutive loads feeding as shuffle operands (#207303)

Perform the following fold given loadA and loadB can be proven
consecutive:
```
concat(shuffle(loadA, loadB, mask0), shuffle(loadA, loadB, mask1))
 -> shuffle(loadAB, poison, concat(mask0, mask1))
```
DeltaFile
+246-0llvm/test/CodeGen/AArch64/merge-loads-feeding-as-shuffleops.ll
+86-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+12-10llvm/test/CodeGen/Thumb2/mve-vst2.ll
+344-103 files

LLVM/project 914d5a1lld/COFF SymbolTable.cpp LTO.cpp, lld/ELF Driver.cpp

[DTLTO] Overlap temporary file removal (#209423)

Deleting the temporary files produced by the DTLTO pipeline can be
expensive on Windows hosts. For a Clang link (Debug build with
sanitizers and instrumentation) using an optimized toolchain (PGO
non-LTO, llvmorg-22.1.0) on a Windows 11 Pro (Build 26200), AMD Family
25 @ ~4.5 GHz, 16 cores/32 threads, 64 GB RAM machine, the mean duration
of the "Remove DTLTO temporary files" time trace scope was 1267.789 ms
(measured over 10 runs).

This patch performs the deletions on a background thread, allowing them
to overlap with the tail of the link to hide this cost.

This is a re-implementation of the asynchronous cleanup idea from
https://github.com/llvm/llvm-project/pull/186988, which had to be
reverted in https://github.com/llvm/llvm-project/pull/189043 because
cleanup was not guaranteed to complete before LLD invoked
timeTraceProfilerCleanup(). In certain cases timeTraceProfilerCleanup()
was called before temporary file deletion had completed in LLD, which

    [8 lines not shown]
DeltaFile
+47-15llvm/lib/DTLTO/DTLTO.cpp
+23-1llvm/include/llvm/DTLTO/DTLTO.h
+9-0lld/ELF/Driver.cpp
+8-0llvm/include/llvm/LTO/LTO.h
+5-0lld/COFF/SymbolTable.cpp
+5-0lld/COFF/LTO.cpp
+97-167 files not shown
+111-1613 files

LLVM/project d8d1d44mlir/include/mlir/Debug ExecutionContext.h, mlir/lib/Debug ExecutionContext.cpp

[MLIR] Rerun control for actions in execution context (#209197)

Adds a Rerun control value to ExecutionContext::Control that allows the
re-execution of the current action immediately after it completes,
without restarting the full compilation pipeline. This is analogous to
GDB's ability to restart execution from a breakpoint. When the callback
returns Rerun, the action is executed normally, then re-dispatched
through the full ExecutionContext::operator() pipeline, including
breakpoint matching, so the user gets a fresh opportunity to inspect or
control the re-execution. As a practical usage example, a breakpoint +
an observer can be added, to save and restore IR between runs to check
if each run produces the same IR or something different each time. A
depth-keyed structure is used, so rerun requests survive nested action
dispatch and are consumed by the correct stack frame.
DeltaFile
+67-0mlir/unittests/Debug/ExecutionContextTest.cpp
+21-1mlir/lib/Debug/ExecutionContext.cpp
+12-1mlir/include/mlir/Debug/ExecutionContext.h
+100-23 files

LLVM/project e2c012fclang/docs ReleaseNotes.md, clang/lib/Sema SemaDeclCXX.cpp

[Clang][Sema] Fix crash on lambda parameter pack with illegal default argument (#210718)

`Sema::ActOnParamDefaultArgument` checked a default-argument expression
for unexpanded parameter packs before checking whether the parameter
itself is a pack. For a lambda parameter pack given a default argument
that is a pack expansion referencing an enclosing function's parameter
pack (e.g. `[](Types... = args...) {}`), the first check runs while
still inside the lambda's scope and sets
`LambdaScopeInfo::ContainsUnexpandedParameterPack` (a mechanism meant
for legitimate outer-pack references). The subsequent
`isParameterPack()` check then correctly diagnoses the real error and
discards the default argument, but the stale flag survives into the
built `LambdaExpr`'s dependence bits. A later unexpanded-pack check on
that `LambdaExpr` finds nothing to report and hits
`assert(!Unexpanded.empty() || LambdaReferencingOuterPacks)`, aborting
instead of just diagnosing the error.

Fix: check `Param->isParameterPack()` first and return immediately after
discarding the default argument, before ever calling

    [5 lines not shown]
DeltaFile
+10-4clang/lib/Sema/SemaDeclCXX.cpp
+13-0clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp
+5-0clang/docs/ReleaseNotes.md
+28-43 files

LLVM/project fd9e690llvm/lib/CodeGen RegisterCoalescer.cpp

[RegisterCoalescer] Avoid retrying high-cost joins for live intervals (#207976)

Recently we found a compile time problem in the case that contains much
high-cost live
interval. And normal interference failures still set `Again=true` and
can be retried
(it cost N^2 complexity). We tracks when a join failed only because of
the high-cost
guard, so that avoids putting such copies back into the retry worklist.

This reduce our huge function case from 14.6h to 12.8min in register
coalescer pass.
DeltaFile
+69-50llvm/lib/CodeGen/RegisterCoalescer.cpp
+69-501 files

LLVM/project d0cc912llvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Use equal_to in isUsedByLoadStoreAddr (NFC) (#210911)
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+1-21 files

LLVM/project bcde1afoffload/plugins-nextgen/level_zero/src L0Queue.cpp

[OFFLOAD][L0] Fix PatternSize assert in L0QueueTy::memoryFill (#210867)

The message was the opposite of the assert condition.

In addition, when PatternSize == Size the caller wants to fill the
region with exactly one copy of the pattern, which is a valid operation.

The issue was found by AI.

Also check `Size % PatternSize == 0` per L0 spec.
DeltaFile
+2-2offload/plugins-nextgen/level_zero/src/L0Queue.cpp
+2-21 files

LLVM/project 50f7af6llvm/include/llvm/Transforms/Scalar GVN.h, llvm/lib/Transforms/Scalar GVN.cpp

[GVN] Remove unused debug helper (NFC)

The `GVNPass::dump` method is not used anywhere. Moreover, there's
no `GVNPass` state that corresponds to its parameter type. Even if a
`GVNPass::dump` method could be useful, this one wasn't it.
DeltaFile
+0-11llvm/lib/Transforms/Scalar/GVN.cpp
+0-1llvm/include/llvm/Transforms/Scalar/GVN.h
+0-122 files

LLVM/project ca5e13ellvm/test/TableGen RuntimeLibcallEmitter-multiple-impls.td RuntimeLibcallEmitter-conflict-warning.td, llvm/utils/TableGen/Basic RuntimeLibcallsEmitter.cpp

RuntimeLibcalls: Emit all available impls for a libcall, not just one

The intent is RuntimeLibcalls should represent all functions that are
callable from the module, which may have contextually selectable alternatives.
Previously we had this warning since there was no mechanism to select which
one you want, and as a workaround the library call sets avoided adding the
variants which should nto be selected.

Now targets can use initLibcallLoweringInfo, so remove the warning to unblock
more libcall cleanups. Eventually initLibcallLoweringInfo should also be tablegen
driven.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+100-0llvm/test/TableGen/RuntimeLibcallEmitter-multiple-impls.td
+0-97llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
+3-25llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+103-1223 files

LLVM/project dce3dc8clang/include/clang/AST TemplateBase.h, clang/include/clang/Sema SemaConcept.h

[Clang] Add NormalizedConstraint::dump() (#210498)

This facilitates debugging with concepts, particularly when we need to
check complex parameter mappings.

Since this is mainly for debugging purpose, we don't promise any text
stability and hence no tests provided.
DeltaFile
+147-0clang/lib/Sema/SemaConcept.cpp
+26-0clang/lib/AST/TemplateBase.cpp
+3-0clang/include/clang/Sema/SemaConcept.h
+2-0clang/include/clang/AST/TemplateBase.h
+178-04 files

LLVM/project 24bc799llvm/test/CodeGen/AMDGPU llvm.amdgcn.s.wait.async.tensor.ll llvm.amdgcn.s.wait.gfx1250.ll

[NFC][AMDGPU] Add s_wait asynccnt/tensorcnt test for gfx13
DeltaFile
+42-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.wait.async.tensor.ll
+0-30llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.wait.gfx1250.ll
+42-302 files

LLVM/project 46fb353compiler-rt/test lit.common.cfg.py

[compiler-rt][test] Skip page-size feature detection under emulators. (#210683)

This avoids adding a page-size-* lit feature when compiler-rt tests are
configured to run through an emulator.

Perviously this used to work because failure to detect the page size
would fall back to 4096. Now after this change
https://github.com/llvm/llvm-project/pull/209175, the code tries to
execute config.python_executable through the emulator. For
emulator-based test configurations, this is inappropriate. The function
now returns None when an emulator is configured, and the lit feature is
only added when a concrete page size is available.
DeltaFile
+9-2compiler-rt/test/lit.common.cfg.py
+9-21 files

LLVM/project feabbb0clang/lib/StaticAnalyzer/Checkers LifetimeModeling.cpp, clang/test/Analysis lifetime-bound.cpp

[analyzer] Fix false positive when a lifetimebound method is called during destruction (#210801)

When a `lifetimebound` method is called during destruction the checker
emits warnings which leads to false positives. To avoid this a dangling
stack source is not reported if any frame on the current stack belongs
to a destructor.
DeltaFile
+32-0clang/test/Analysis/lifetime-bound.cpp
+10-0clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.cpp
+42-02 files

LLVM/project bd07f0cllvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Drop redundant ArrayRef constructions (NFC) (#210680)
DeltaFile
+2-4llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+2-41 files

LLVM/project 9e2664ellvm/include/llvm/Transforms/Scalar GVN.h, llvm/lib/Transforms/Scalar GVN.cpp

[GVN] Rename some functions to follow LLVM naming conventions (NFC) (#210332)
DeltaFile
+19-19llvm/lib/Transforms/Scalar/GVN.cpp
+4-4llvm/include/llvm/Transforms/Scalar/GVN.h
+23-232 files

LLVM/project c096c8dllvm/lib/Target/PowerPC PPCMIPeephole.cpp

PPC: Remove manual run of machine verifier (#208032)

This is redundant with using the standard -verify-machineinstrs.
It's also confusing / worse, since the error is not produced to
stderr.
DeltaFile
+1-7llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+1-71 files

LLVM/project 30c6308llvm/include/llvm/Analysis LibcallLoweringInfo.h

Adjust comment
DeltaFile
+1-1llvm/include/llvm/Analysis/LibcallLoweringInfo.h
+1-11 files

LLVM/project 0228facllvm/lib/Target/RISCV RISCVISelLowering.cpp RISCVISelDAGToDAG.cpp, llvm/test/CodeGen/RISCV rv32p.ll

[RISCV][P-Ext] Add RISCVISD::WADD/WSUB. (#210862)
DeltaFile
+22-0llvm/test/CodeGen/RISCV/rv32p.ll
+14-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+8-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+2-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+46-04 files

LLVM/project 285a3cbllvm/include/llvm/ADT GenericCycleInfo.h GenericCycleImpl.h

[CycleInfo] Store entries in the block layout. NFC (#210866)

A reducible loop has a single entry (header), which flatten() places at
BlockLayout[IdxBegin], as its minimum-preorder block. A reducible loop
then needs no storage at all.

For the uncommon irreducible loop case, we append its full entry list
(header first) after the Euler tour, referenced by [EntryBegin,
EntryBegin+EntrySize), making `GenericCycleInfo::Cycle` (named only
because "loop" is occupied by LoopInfo) trivially destructible.
DeltaFile
+25-21llvm/include/llvm/ADT/GenericCycleInfo.h
+19-5llvm/include/llvm/ADT/GenericCycleImpl.h
+44-262 files

LLVM/project 11aea0bllvm/include/llvm/IR RuntimeLibcalls.td

RuntimeLibcalls: Add sqrtf to the Hexagon runtime libcall set

The library definitions go out of the way to avoid adding sqrtf, in favor
of __hexagon_sqrtf. I'm assuming that libm does provide sqrtf, it just
happens that there is a more-preferred function to use. RuntimeLibcallsInfo
should express the full set of functions that do exist, and LibcallLoweringInfo
should express the preference for which calls should be used.

By the current ordering rules, it just so happens __hexagon_sqrtf will win out
for SQRT_F32. Add this to avoid a special case to faciliate future libcall
improvements.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+1-1llvm/include/llvm/IR/RuntimeLibcalls.td
+1-11 files

LLVM/project 2825acallvm/test/CodeGen/AArch64 sve-fixed-vector-lrint.ll sve-lrint.ll

[AArch64] Add SVE lowering for FP_TO_[US]INT_SAT.
DeltaFile
+490-1,132llvm/test/CodeGen/AArch64/sve-fixed-vector-lrint.ll
+319-1,280llvm/test/CodeGen/AArch64/sve-lrint.ll
+319-1,280llvm/test/CodeGen/AArch64/sve-llrint.ll
+270-586llvm/test/CodeGen/AArch64/sve-fixed-vector-llrint.ll
+113-333llvm/test/CodeGen/AArch64/sve-fptosi-sat.ll
+53-345llvm/test/CodeGen/AArch64/sve-fixed-length-fp-to-int-sat.ll
+1,564-4,9562 files not shown
+1,680-5,2358 files

LLVM/project d13b862clang/include/clang/Basic DiagnosticParseKinds.td DiagnosticGroups.td, clang/lib/Parse ParseStmt.cpp

[clang][Parser] Warn when the body of expansion statement is not a compound statement (#209229)

<https://eel.is/c++draft/stmt.expand#nt:expansion-statement>:

_expansion-statement_:  
template for ( _init-statement<sub>opt</sub>_ _for-range-declaration_ :
_expansion-initializer_ ) _compound-statement_
DeltaFile
+47-0clang/test/Parser/cxx2c-expansion-statements-non-compound-stmt-body.cpp
+11-0clang/lib/Parse/ParseStmt.cpp
+6-0clang/include/clang/Basic/DiagnosticParseKinds.td
+1-0clang/include/clang/Basic/DiagnosticGroups.td
+65-04 files