LLVM/project fc31f00 — mlir/lib/Transforms/Utils RegionUtils.cpp GreedyPatternRewriteDriver.cpp, mlir/test/Transforms canonicalize-cfg-reachability.mlir greedy-label-reachability-op-driver.mlir

[mlir] Add LabelLike trait for blocks entered without a CFG edge

Some ops mark a block that control enters through a jump the CFG does
not show yet. ClangIR's cir.label is the target of cir.goto, which may
leave a region and only becomes a branch once the CFG is flattened.
Such a block often has no predecessors, so eraseUnreachableBlocks
deletes it and the greedy driver skips its ops.

This adds OpTrait::LabelLike for an op that starts a non-entry block,
and findLabelEntry, which returns the op where control enters a block
through a label. That is either the label itself or an op whose regions
contain one, unless that op, or one between it and the label, is
isolated from above.

eraseUnreachableBlocks keeps these blocks, the blocks they reach and the
blocks whose values they use. Region DCE treats every remaining block as
live, and cf.br does not merge a labeled block into its predecessor.

GreedyRewriteConfig::enableRewritingAfterLabels, off by default, lets

    [7 lines not shown]
DeltaFile
+376-0mlir/test/Transforms/greedy-label-reachability.mlir
+202-20mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+84-4mlir/lib/Transforms/Utils/RegionUtils.cpp
+61-0mlir/test/Transforms/greedy-label-reachability-op-driver.mlir
+58-0mlir/test/Transforms/canonicalize-cfg-reachability.mlir
+53-1mlir/test/lib/Dialect/Test/TestPatterns.cpp
+834-2512 files not shown
+1,053-2918 files

LLVM/project 493a575 — mlir/lib/Dialect/Bufferization/Transforms BufferResultsToOutParams.cpp, mlir/test/Transforms buffer-results-to-out-params-hosit-static-allocs.mlir

[mlir][bufferization] Do not hoist copying allocations to out-params (#242630)

With `hoist-static-allocs` enabled, `-buffer-results-to-out-params`
replaces returned allocations with caller-provided output buffers and
erases their defining operations. Checking only `AllocationOpInterface`
also matches `memref.realloc` and `bufferization.clone`, whose results
preserve or reproduce existing data. Erasing these operations loses that
data and leaves the output buffer partially or entirely uninitialized.

Require `getHoistingKind() != HoistingKind::None` before replacing an
allocation. `memref.realloc` (`None` since #231608) and
`bufferization.clone` (`None` by default) are retained. For the static
results in #242611, the pass copies their contents into the output
parameters through the existing fallback path. `memref.alloc` remains
eligible for replacement.

The check remains interface-based, preserving support for custom
allocation operations introduced in #120288. Such operations remain
eligible when they report a non-None hoisting kind.

    [12 lines not shown]
DeltaFile
+24-0mlir/test/Transforms/buffer-results-to-out-params-hosit-static-allocs.mlir
+7-3mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
+31-32 files

LLVM/project b073dde — lld/MachO Writer.cpp InputFiles.cpp

[lld/mac] Claim per-file work one item at a time (#242765)

This ports #240094 to lld/MachO.

Relocation processing in lld/MachO doesn't need an index, so this can
use parallelForFineGrained instead of parallelForSharded() in lld/ELF.

Linking Chromium Framework on an M4 Max (time trace scopes, median of
7):

    Parse relocations:               115 ms -> 75 ms
    Apply linker optimization hints:  36 ms -> 22 ms

Total link (hyperfine, median of 15): 3.911 s -> 3.859 s

No behavior change.
DeltaFile
+2-1lld/MachO/Writer.cpp
+2-1lld/MachO/InputFiles.cpp
+4-22 files

LLVM/project fd1c6ca — mlir/docs/Rationale SideEffectsAndSpeculation.md

[mlir][docs] Add guidance on "non observable" side effect modeling (#242620)

Mention that a dialect defines which aspects of execution are observable
and which are
implementation details outside that semantic model. Also add a few
examples.

Discussion:
https://discourse.llvm.org/t/guidance-on-not-observable-side-effect-modeling/92790

Assisted-by: Codex
DeltaFile
+47-2mlir/docs/Rationale/SideEffectsAndSpeculation.md
+47-21 files

LLVM/project d626721 — llvm/lib/Transforms/Scalar SROA.cpp, llvm/test/Transforms/SROA byte-conversion-big-endian.ll byte-conversion.ll

[SROA] Don't widen byte values through integers
DeltaFile
+228-15llvm/lib/Transforms/Scalar/SROA.cpp
+19-62llvm/test/Transforms/SROA/byte-conversion.ll
+7-23llvm/test/Transforms/SROA/byte-conversion-big-endian.ll
+254-1003 files

LLVM/project 3b9664b — llvm/test/Transforms/SROA byte-conversion-big-endian.ll byte-conversion.ll

[SROA] Pre-commit tests for byte conversions
DeltaFile
+476-0llvm/test/Transforms/SROA/byte-conversion.ll
+99-0llvm/test/Transforms/SROA/byte-conversion-big-endian.ll
+575-02 files

LLVM/project 731f891 — llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Simplify vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+24-5llvm/lib/Analysis/InstructionSimplify.cpp
+2-4llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+26-92 files

LLVM/project d41c8ae — llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Pre-commit tests for vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+20-0llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+20-01 files

LLVM/project fa66fc5 — llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Simplify vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+24-5llvm/lib/Analysis/InstructionSimplify.cpp
+2-4llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+26-92 files

LLVM/project f7b5fe9 — llvm/test/Transforms/InstSimplify bitinsert-bitextract.ll

[InstSimplify] Pre-commit tests for vector `bitinsert` and `bitextract` with out-of-range offsets
DeltaFile
+20-0llvm/test/Transforms/InstSimplify/bitinsert-bitextract.ll
+20-01 files

LLVM/project f32560f — llvm/test/CodeGen/ARM twoaddrinstr.ll constantpool-align.ll, llvm/test/CodeGen/Thumb2 mve-store-constant.ll

[ARM] Add store-constant test cases. NFC (#242814)
DeltaFile
+81-0llvm/test/CodeGen/ARM/neon-store-constant.ll
+76-0llvm/test/CodeGen/Thumb2/mve-store-constant.ll
+46-15llvm/test/CodeGen/ARM/constantpool-align.ll
+15-13llvm/test/CodeGen/ARM/twoaddrinstr.ll
+218-284 files

LLVM/project 857a709 — llvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Build SCEV of VPDerivedIVRecipe like its expansion (NFC). (#242804)

Compute the SCEV of a VPDerivedIVRecipe as Start + zext-or-trunc(Index)
* Step, matching expandVPDerivedIV. Previously Start and Step were
truncated or sign-extended to the type of Index, so the SCEV had Index's
type rather than the recipe's, and VPScalarIVStepsRecipe truncated it
back. Remove that truncate.

All derived IVs queried today have an Index at least as wide as Start,
where both forms fold to the same SCEV.
DeltaFile
+9-9llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+9-91 files

LLVM/project 8fea0b4 — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify ptrtoaddr.ll

[ConstantFolding] Use the pointer width for ptrtoint of inttoptr (#237878)

Previously, folding `ptrtoint (inttoptr C)` truncated C to the address
width and dropped the non-address bits; use the pointer width instead.

Fixes #235642.

Assisted-by: Claude Opus 5.5
DeltaFile
+10-0llvm/test/Transforms/InstSimplify/ptrtoaddr.ll
+4-5llvm/lib/Analysis/ConstantFolding.cpp
+14-52 files

LLVM/project 163b471 — clang/test/Headers __clang_hip_math.hip, flang/lib/Semantics resolve-directives.cpp

Merge branch 'main' into users/zero9178/nvvm-dialect-op-partitions
DeltaFile
+1,275-19,674utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+6,864-0utils/bazel/llvm-project-overlay/libc/src/__support/math/BUILD.bazel
+3,684-0utils/bazel/llvm-project-overlay/libc/src/math/BUILD.bazel
+1,728-1,728clang/test/Headers/__clang_hip_math.hip
+1,512-1,574llvm/test/CodeGen/X86/clmul-vector.ll
+1,434-1,354flang/lib/Semantics/resolve-directives.cpp
+16,497-24,3301,489 files not shown
+62,191-50,8851,495 files

LLVM/project 6fd40e0 — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Fold vector `bitinsert` and `bitextract`
DeltaFile
+67-6llvm/lib/Analysis/ConstantFolding.cpp
+12-27llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+79-332 files

LLVM/project 31d8b8c — llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Pre-commit tests for vector `bitinsert` and `bitextract`
DeltaFile
+112-0llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+112-01 files

LLVM/project 46a6a91 — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify bitcast-vector-fold.ll

[ConstantFolding] Fold constant vector `bitcast`s to scalar bytes
DeltaFile
+20-8llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll
+19-5llvm/lib/Analysis/ConstantFolding.cpp
+2-4llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+41-173 files

LLVM/project 1ce0d02 — llvm/test/Transforms/InstSimplify bitcast-vector-fold.ll, llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Pre-commit tests for constant vector `bitcast`s to scalar bytes
DeltaFile
+69-0llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll
+20-0llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+89-02 files

LLVM/project e2a8eb6 — clang/test/CodeGen hexagon-hlx-vector-pair-half.c hexagon-hlx-vector-pair-copy.c

Revert "[Hexagon] Test lowering of Clang HLX vector pair locals at -O0 (#242403) (#242803)

This reverts commit 351abdb04162065e75b007840aaf20ec7ac99a2b.

The tests fail in release builds because the values are unnamed.
DeltaFile
+0-34clang/test/CodeGen/hexagon-hlx-vector-pair-copy.c
+0-27clang/test/CodeGen/hexagon-hlx-vector-pair-half.c
+0-612 files

LLVM/project 069b424 — mlir/include/mlir/Dialect/OpenACC OpenACC.h OpenACCCGAttributes.td, mlir/test/Dialect/OpenACC ops-cg.mlir

[mlir][acc] Add the #acc.offload_packager offloading handler

Add an offloading handler attribute for gpu.module and gpu.binary that
is meant to embed the device images in the host object as LLVM offloading
binaries of kind OpenACC, for the offloading linker wrapper to link and
register with the OpenACC runtime.

Assisted-by: Claude Sonnet 5.5
DeltaFile
+19-0mlir/include/mlir/Dialect/OpenACC/OpenACCCGAttributes.td
+11-0mlir/test/Dialect/OpenACC/ops-cg.mlir
+1-0mlir/include/mlir/Dialect/OpenACC/OpenACC.h
+31-03 files

LLVM/project db84b80 — mlir/include/mlir/Dialect/OpenACC OpenACC.h, mlir/lib/Target/LLVMIR/Dialect/OpenACC CMakeLists.txt OpenACCToLLVMIRTranslation.cpp

[mlir][acc] Translate the acc.offload_entry attribute to an offloading entry

Add the acc.offload_entry unit attribute, which marks a global host symbol
(either a function or a global variable) that the offload runtime must be able
to associate with its device counterpart. The translation emits entries that
are registered with the OpenACC runtime libacctarget.

Assisted-by: Claude Sonnet 5.5
DeltaFile
+47-0mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
+24-2mlir/test/Target/LLVMIR/openacc-offload.mlir
+7-0mlir/include/mlir/Dialect/OpenACC/OpenACC.h
+1-0mlir/lib/Target/LLVMIR/Dialect/OpenACC/CMakeLists.txt
+79-24 files

LLVM/project 7d0debe — mlir/include/mlir/Target/LLVMIR/Dialect All.h, mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC OpenACCToLLVMIRTranslation.h

[mlir][acc] Translate #acc.offload_packager to LLVM IR

Add a translation library for the OpenACC dialect that implements the
offloading translation interface of #acc.offload_packager. Each object
of a gpu.binary is wrapped in an offloading binary of kind OpenACC,
carrying the target triple and architecture, and the images are placed
in the .llvm.offloading section of the host module for the offloading
linker wrapper to extract.

Assisted-by: Claude Sonnet 5.5
DeltaFile
+173-0mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
+43-0mlir/test/Target/LLVMIR/openacc-offload.mlir
+29-0mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.h
+23-0mlir/test/Target/LLVMIR/openacc-offload-objdump.mlir
+20-0mlir/lib/Target/LLVMIR/Dialect/OpenACC/CMakeLists.txt
+2-0mlir/include/mlir/Target/LLVMIR/Dialect/All.h
+290-04 files not shown
+294-010 files

LLVM/project c0bac6f — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify bitcast-vector-fold.ll

[ConstantFolding] Fold constant vector `bitcast`s to scalar bytes
DeltaFile
+20-8llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll
+19-5llvm/lib/Analysis/ConstantFolding.cpp
+2-4llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+41-173 files

LLVM/project 33b6589 — llvm/test/Transforms/InstSimplify bitcast-vector-fold.ll, llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Pre-commit tests for constant vector `bitcast`s to scalar bytes
DeltaFile
+61-0llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll
+20-0llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+81-02 files

LLVM/project 02dfd59 — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Fold vector `bitinsert` and `bitextract`
DeltaFile
+67-6llvm/lib/Analysis/ConstantFolding.cpp
+10-23llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+77-292 files

LLVM/project 2301bd7 — llvm/test/Transforms/InstSimplify/ConstProp bitinsert-bitextract.ll

[ConstantFolding] Pre-commit tests for vector `bitinsert` and `bitextract`
DeltaFile
+101-7llvm/test/Transforms/InstSimplify/ConstProp/bitinsert-bitextract.ll
+101-71 files

LLVM/project 6639eff — clang/include/clang/CIR/Dialect Passes.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Make cir-canonicalize a full canonicalizer

cir-canonicalize applied the CIR canonicalization patterns and folders
only to a hand-written list of operations. It now builds the pattern set
once in initialize() and runs the greedy driver over every operation, so
every pattern and folder applies everywhere. Only operations that
rewriting left dead are erased, such as the inputs of a folded
operation: CIR stays close to the source, so unused locals and ignored
expressions are kept as in classic codegen. Empty scopes and switches
were removed only because they were dead, so they get explicit
canonicalization patterns.

The pass uses the multi-op driver because the region driver always
erases blocks without a CFG predecessor, and a block that starts with
cir.label is reached only through cir.goto until the goto solver runs.
Region simplification stays off for the same reason. The new
test-convergence option fails the pass when the driver does not reach a
fixpoint, as in the upstream canonicalizer.

Assisted-by: Claude Code (claude-opus-5-5).
DeltaFile
+52-58clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
+32-24clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+51-0clang/test/CIR/Transforms/canonicalize-dead-code.cir
+8-8clang/test/CIR/CodeGen/fold-during-cg.c
+10-2clang/include/clang/CIR/Dialect/Passes.td
+9-1clang/test/CIR/CodeGen/vla.c
+162-9314 files not shown
+202-9620 files

LLVM/project a723f0e — mlir/include/mlir/Transforms Passes.td GreedyPatternRewriteDriver.h, mlir/lib/Interfaces SideEffectInterfaces.cpp

[mlir] Add a dead code elimination mode to the greedy rewriter

The greedy pattern rewrite driver always erases trivially dead
operations, so a client that wants canonicalization patterns and
folders without dead code elimination has no way to get it. Add
GreedyRewriteConfig::setDeadCodeElimination and the matching
dead-code-elimination option of the canonicalizer pass, with three
modes:

- all, the default, erases every trivially dead operation as before.
- newly-dead erases an operation only once the erasure or replacement
  of another operation drops its last use, so the inputs that a fold
  leaves unused go away while operations that were dead before
  rewriting are kept.
- disabled erases an operation only by a pattern or by folding.

Region simplification is separate and still removes dead values unless
it is disabled too. The deadness cache skips invalidation while it is
empty, so a run that never queries it pays nothing for its tracking.

    [2 lines not shown]
DeltaFile
+28-0mlir/test/Transforms/canonicalize-dead-code-elimination.mlir
+26-1mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+24-2mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
+14-0mlir/include/mlir/Transforms/Passes.td
+6-0mlir/lib/Interfaces/SideEffectInterfaces.cpp
+2-0mlir/lib/Transforms/Canonicalizer.cpp
+100-33 files not shown
+103-69 files

LLVM/project 1fb3e9e — clang/test/CodeGen hexagon-hlx-vector-pair-half.c hexagon-hlx-vector-pair-copy.c

Revert "[Hexagon] Test lowering of Clang HLX vector pair locals at -O0 (#242403)"

This reverts commit 351abdb04162065e75b007840aaf20ec7ac99a2b.
DeltaFile
+0-34clang/test/CodeGen/hexagon-hlx-vector-pair-copy.c
+0-27clang/test/CodeGen/hexagon-hlx-vector-pair-half.c
+0-612 files

LLVM/project 4762c69 — mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp, mlir/test/Conversion/SPIRVToLLVM cl-ops-to-llvm.mlir

[mlir][SPIR-V] Add SPIRVToLLVM conversion for CL.printf (#238043)
DeltaFile
+34-6mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+15-0mlir/test/Conversion/SPIRVToLLVM/cl-ops-to-llvm.mlir
+49-62 files