LLVM/project fcbfeb5 — offload/plugins-nextgen/level_zero/include L0Context.h

[Offload][L0] Fix debug build (#231218)

Debug build has been broken due to typos.
DeltaFile
+4-4offload/plugins-nextgen/level_zero/include/L0Context.h
+4-41 files

LLVM/project 6bce7e0 — llvm/unittests/Support ProgramTest.cpp

[SupportTests] Ignore STATUS_DLL_NOT_FOUND errors with MSVC (#230726)

When the unittests are linked with LLVM.dll, the
TestExecuteEmptyEnvironment fails because there are no library paths to
search. There was already a workaround for this issue on MINGW, and this
patch just extends it to work in MSVC mode environments too.
DeltaFile
+7-2llvm/unittests/Support/ProgramTest.cpp
+7-21 files

LLVM/project 76ae37b — clang/lib/CIR/CodeGen CIRGenCall.cpp

[CIR] Address review comments
DeltaFile
+7-9clang/lib/CIR/CodeGen/CIRGenCall.cpp
+7-91 files

LLVM/project d3d250c — llvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU setcc-multiple-use.ll combine-and-sext-bool.ll

perf(AMDGPU): fold extended boolean AND/OR

Accept ANY_EXTEND in the AND-to-select combine and add the matching
OR fold. Guard OR folds for shared extensions and uniform conditions
to avoid code-size regressions.
DeltaFile
+123-0llvm/test/CodeGen/AMDGPU/or.ll
+37-6llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+16-0llvm/test/CodeGen/AMDGPU/combine-and-sext-bool.ll
+3-4llvm/test/CodeGen/AMDGPU/setcc-multiple-use.ll
+179-104 files

LLVM/project be79c94 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor cleanup-no-seeding.ll

[Attributor] Skip the dead-internal-function walk for AAs that will not be updated (#227187)

AAIsDeadFunction::initialize calls isAssumedDeadInternalFunction, which
runs checkForAllCallSites and so creates an AAIsDead for every internal
caller, each of which repeats the walk. Initialization therefore
recurses through the whole cone of internal callers.

When the AA will not be updated (outside of deduction, or for a function
the Attributor is not run on), getOrCreateAAFor fixes it pessimistically
right after initialize returns, discarding the walk's result. Skip the
walk in that case and assume the entry block live.

This is the dominant cost of the CGSCC OpenMPOpt pass, whose cleanupIR
queries the liveness of callers outside the current SCC on every SCC,
giving (#SCCs) x (depth of the internal caller chain). #222226 removed
the callee-seeding half of this cost; this removes the walk itself.

* The cleanup-no-seeding.ll change drops a debug check that only the
removed walk printed.

    [30 lines not shown]
DeltaFile
+6-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+0-1llvm/test/Transforms/Attributor/cleanup-no-seeding.ll
+6-12 files

LLVM/project a1a4701 — bolt/lib/Core DIEBuilder.cpp, bolt/lib/Rewrite DWARFRewriter.cpp

[BOLT] Handle the indexed DWARF address forms by class (#227591)

DWARF's address class covers DW_FORM_addr plus DW_FORM_addrx,
addrx1 through addrx4 and DW_FORM_GNU_addr_index, where the
indexed ones store an index into .debug_addr rather than the
address itself. Several places enumerated a subset of those
forms instead of testing the class, so addrx1 through addrx4
took wrong code path.

The local getHighPC() helper compared against DW_FORM_addr
alone, so every indexed form was read as an offset, yielding
"LowPC + index". It also never resolved an index at all,
unlike the getLowPC() directly above it.

Add isAddressForm() and isIndexedAddressForm(), and route all
of the above through them. getHighPC() now takes a DWARFUnit
argument so it can resolve an index through .debug_addr the
way getLowPC() does.


    [15 lines not shown]
DeltaFile
+175-0bolt/test/AArch64/dwarf5-addrx-lowpc-highpc.s
+87-24bolt/lib/Rewrite/DWARFRewriter.cpp
+4-0bolt/lib/Core/DIEBuilder.cpp
+266-243 files

LLVM/project 46c5ec8 — clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenExprScalar.cpp

[CIR] Implement matrix scalar multiplication support (#230815)

Implement multiplication op support between matrix and scalar types.

Issue https://github.com/llvm/llvm-project/issues/221772
DeltaFile
+56-1clang/test/CIR/CodeGen/matrix.cpp
+9-3clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+0-11clang/test/CIR/IR/invalid-matrix.cir
+7-4clang/include/clang/CIR/Dialect/IR/CIROps.td
+72-194 files

LLVM/project 5cd63aa — llvm/test/CodeGen/AMDGPU legalize-amdgcn.raw.ptr.buffer.store.ll legalize-amdgcn.raw.buffer.load.ll, llvm/test/CodeGen/AMDGPU/GlobalISel inst-select-load-flat.mir inst-select-load-global.mir

AMDGPU: Stop setting kill flags before FinalizeISel (#229009)

Work on removing all pre-RA flag management. Kill flags should
eventually be
removed. Pre-regalloc passes no longer depend on them, LiveIntervals
strips them
and VirtRegRewriter re-introduces them.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+108-108llvm/test/CodeGen/AMDGPU/legalize-amdgcn.raw.ptr.buffer.load.ll
+81-81llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-global.mir
+81-81llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-global-old-legalization.mir
+76-76llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-flat.mir
+70-70llvm/test/CodeGen/AMDGPU/legalize-amdgcn.raw.buffer.load.ll
+66-66llvm/test/CodeGen/AMDGPU/legalize-amdgcn.raw.ptr.buffer.store.ll
+482-482114 files not shown
+1,577-1,580120 files

LLVM/project 9e00863 — mlir/lib/Conversion/SCFToControlFlow SCFToControlFlow.cpp, mlir/test/Conversion/SCFToControlFlow convert-to-cfg.mlir

[mlir][SCFToControlFlow] Mark the scf.for increment as non-wrapping (#230891)

`scf.for` makes it undefined behavior for `LB + n*Step` not to be
representable in the induction variable type (#203713), so no increment
of the induction variable can wrap under the interpretation of the
bounds. Emit the increment with `overflow<nsw>`, or `overflow<nuw>` for
loops with `unsignedCmp`.

Without the flag, LLVM cannot prove that an induction variable that
starts non-negative and has a non-negative step stays non-negative.

Assisted-by: Cursor
DeltaFile
+13-11mlir/test/Conversion/SCFToControlFlow/convert-to-cfg.mlir
+8-1mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp
+21-122 files

LLVM/project eca10f0 — mlir/include/mlir/Interfaces DataLayoutInterfaces.h, mlir/lib/Dialect/LLVMIR/IR LLVMTypes.cpp

[mlir][DataLayout] Add getTypeAllocSize

Add DataLayout::getTypeAllocSize, the type's size rounded up to its ABI
alignment, as in llvm::DataLayout.  Use it for the three places that
computed this by hand: LLVM dialect arrays and structs, and the OpenMP
offload privatization pass.  ClangIR's type layout hooks also need it.

Assisted-by: Cursor / Claude Opus 5.5
DeltaFile
+29-0mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
+27-0mlir/test/Dialect/LLVMIR/layout.mlir
+2-5mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+1-3mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
+4-0mlir/lib/Interfaces/DataLayoutInterfaces.cpp
+4-0mlir/include/mlir/Interfaces/DataLayoutInterfaces.h
+67-83 files not shown
+71-89 files

LLVM/project eb82884 — flang/lib/Optimizer/CodeGen CodeGen.cpp

[flang][cuda] Return early if no cuf.shared_type_descs attribute is set (#231222)

Avoid to look at parent operations if not needed.
DeltaFile
+4-4flang/lib/Optimizer/CodeGen/CodeGen.cpp
+4-41 files

LLVM/project e2e4757 — lldb/source/Plugins/DynamicLoader/Windows-DYLD DynamicLoaderWindowsDYLD.h DynamicLoaderWindowsDYLD.cpp, lldb/source/Plugins/ObjectFile/PECOFF ObjectFilePECOFF.cpp

[lldb][Windows] Support TLS variables with PDB (#229894)

This implements `DynamicLoaderWindowsDYLD::GetThreadLocalData` which
resolves a TLS offset for a module on a thread into an address. This is
called when `DW_OP_form_tls_address` is evaluated.

On Windows, the address for a thread local is resolved by reading from
the TLS array at the module's `_tls_index`.

It only works with PDB right now, because of a bug in LLVM where it uses
the wrong relocation for the offset (#196083).

Closes #196288.
DeltaFile
+117-2lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
+40-21lldb/test/API/lang/c/tls_globals/main.c
+17-6lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
+5-10lldb/test/API/lang/c/tls_globals/a.c
+13-0lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+8-0lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h
+200-393 files not shown
+205-409 files

LLVM/project 740c9ad — .github/workflows pr-code-lint.yml

[GitHub] Fix PR code lint workflow (#231252)

After 192e44b58239, expect JSON from compute_projects.py rather than
being able to source the output to set env variables.
DeltaFile
+1-2.github/workflows/pr-code-lint.yml
+1-21 files

LLVM/project 22e7ed8 — bolt/lib/Core BinaryFunction.cpp

[BOLT] Expand builtin_unreachable recognition heuristics

A jump to the address right past the end of a function (the result of
__builtin_unreachable()) was replaced with a nop only when the target
was within the function's padding (MaxSize). However, there is a
corner case for the very last function in a section: MaxSize equals
Size, so BOLT would see __builtin_unreachable() instead as as an
interprocedural reference to an address outside of any section,
tripping the "cannot get section for referenced address" assertion in
processInterproceduralReferences(). Fix this.
DeltaFile
+5-3bolt/lib/Core/BinaryFunction.cpp
+5-31 files

LLVM/project a72e6fb — .github/workflows pr-code-lint.yml

[GitHub] Trigger code lint workflow on changes to compute_projects (#231250)

192e44b58239 adjusted the script but broke this workflow. No one noticed
given this workflow was not triggered on those changes. Make the
workflow trigger on these changes so we can catch such breakages.
DeltaFile
+1-0.github/workflows/pr-code-lint.yml
+1-01 files

LLVM/project 384d1bb — flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP variant-source-context.f90

Associate a BLOCK across compiler directives that emit no code

A named INLINEALWAYS, unnamed inlining directives, and loop directives
between a standalone METADIRECTIVE and its BLOCK still ended the search,
so a selected TARGET was empty and the BLOCK was lowered outside it.

Use the DO path's classification of compiler directives that emit no
executable operations for the BLOCK path too, and rename it accordingly.
The directives move with the BLOCK and are still lowered, so a matching
INLINEALWAYS still marks the procedure always-inline, a mismatched one
stays ignored, and loop and inlining directives see the same following
statement as before. PREFETCH still ends the search.
DeltaFile
+12-26flang/lib/Lower/OpenMP/OpenMP.cpp
+25-1flang/test/Lower/OpenMP/variant-source-context.f90
+37-272 files

LLVM/project 6e63677 — mlir/lib/Dialect/Ptr/IR PtrDialect.cpp, mlir/test/Dialect/Ptr canonicalize.mlir

[mlir][ptr] Preserve broadcasts when folding zero pointer offsets (#231077)

ptr.ptr_add accepts a scalar base with a shaped offset and returns a
shaped pointer value. Its zero-offset fold currently returns the scalar
base even when the offset is a zero splat, producing a value with the
wrong type and triggering an assertion during canonicalization.

Only fold to the base when its type matches the result type. Add
regression coverage for fixed vectors, scalable vectors, and tensors,
and check that type-preserving zero-offset folds still apply to shaped
bases.
DeltaFile
+62-0mlir/test/Dialect/Ptr/canonicalize.mlir
+2-1mlir/lib/Dialect/Ptr/IR/PtrDialect.cpp
+64-12 files

LLVM/project 0a0b08f — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor cleanup-no-seeding.ll

[Attributor] Skip the dead-internal-function walk for AAs that will not be updated

AAIsDeadFunction::initialize calls isAssumedDeadInternalFunction, which
runs checkForAllCallSites and so creates an AAIsDead for every internal
caller, each of which repeats the walk. Initialization therefore recurses
through the whole cone of internal callers.

When the AA will not be updated (outside of deduction, or for a function
the Attributor is not run on), getOrCreateAAFor fixes it pessimistically
right after initialize returns, discarding the walk's result. Skip the
walk in that case and assume the entry block live.

This is the dominant cost of the CGSCC OpenMPOpt pass, whose cleanupIR
queries the liveness of callers outside the current SCC on every SCC,
giving (#SCCs) x (depth of the internal caller chain). #222226 removed
the callee-seeding half of this cost; this removes the walk itself.

cleanup-no-seeding.ll drops a debug check that only the removed walk
printed.

    [2 lines not shown]
DeltaFile
+6-0llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+0-1llvm/test/Transforms/Attributor/cleanup-no-seeding.ll
+6-12 files

LLVM/project ba87a6b — clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenModule.cpp

[CIR] Add HLSL to LangOptions in #cir.lowering_lang_options (#230964)

Add HLSL LangOptions to the lowering_lang_options to be used when
lowering the built-in matrix type
DeltaFile
+3-2clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+2-2clang/test/CIR/IR/lowering-lang-options.cir
+1-1clang/test/CIR/Transforms/lowering-prepare.cir
+1-0clang/test/CIR/CodeGen/lowering-lang-options.cpp
+1-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+8-55 files

LLVM/project 337d9d5 — flang/test/Driver split-machine-function-pass.f90, llvm/docs ReleaseNotes.md

[CodeGen] Merge MachineFunctionSplitter into BasicBlockSections (#230365)

Function splitting was done by two passes: MachineFunctionSplitter split
functions using their PGO/AutoFDO profile, and BasicBlockSections split
functions which have a basic block sections profile.
MachineFunctionSplitter had to skip functions in the basic block
sections profile, and both passes renumbered, sorted and fixed up the
blocks of a function.

Move the PGO/AutoFDO splitting logic into BasicBlockSections, so that a
single pass does all function splitting. For every function,
BasicBlockSections now uses the basic block sections profile where it is
available, and otherwise, with -function-splitting=all, the PGO/AutoFDO
profile. The pass is added to the pipeline when function splitting is
enabled, and createBasicBlockSectionsPass() takes a SplitWithPGO
argument which makes it require MachineBlockFrequencyInfo and
ProfileSummaryInfo.

The splitting decisions and the resulting layout are unchanged. The

    [2 lines not shown]
DeltaFile
+208-22llvm/lib/CodeGen/BasicBlockSections.cpp
+0-227llvm/lib/CodeGen/MachineFunctionSplitter.cpp
+9-14llvm/lib/CodeGen/TargetPassConfig.cpp
+5-6llvm/include/llvm/CodeGen/Passes.h
+7-0llvm/docs/ReleaseNotes.md
+3-3flang/test/Driver/split-machine-function-pass.f90
+232-2727 files not shown
+234-27913 files

LLVM/project 14eca55 — clang/lib/CIR/CodeGen CIRGenFunction.cpp, clang/test/CIR/CodeGen fast-math-constrained.c fast-math-pragmas.c

[CIR] Add remaining fast-math flags
DeltaFile
+226-0clang/test/CIR/CodeGen/fast-math-flags.c
+90-0clang/test/CIR/CodeGen/fast-math-pragmas.c
+74-0clang/test/CIR/CodeGen/fast-math-constrained.c
+12-2clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+402-24 files

LLVM/project a0957bb — mlir/include/mlir/Dialect/LLVMIR LLVMOps.td, mlir/lib/Conversion/AMDGPUToROCDL AMDGPUToROCDL.cpp

[MLIR][LLVM] Add noundef metadata to llvm.load (#228517)
DeltaFile
+13-3mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+13-0mlir/test/Target/LLVMIR/Import/instructions.ll
+11-0mlir/test/Target/LLVMIR/llvmir.mlir
+7-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+3-2mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+2-1mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+49-66 files

LLVM/project 4b5a397 — bolt/lib/Passes LongJmp.cpp

[BOLT] Restore -relax-plt as a deprecated no-op option (#230729)

c6ee71d5e8a5 removed -relax-plt from the AArch64 relaxation pass, which
makes llvm-bolt reject existing command lines that still pass it. Re-add
the option as a hidden no-op that only prints a deprecation warning, so
scripts using it keep working.
DeltaFile
+7-0bolt/lib/Passes/LongJmp.cpp
+7-01 files

LLVM/project 8286d20 — llvm/lib/Target/Mips MipsISelLowering.cpp MipsSubtarget.cpp

[Mips] Declare command line options in TableGen (#230738)

Move the cl::opts of MipsCodeGen into MipsOptions.td, and those of
MipsDesc into MCTargetDesc/MipsMCOptions.td, registered by
LLVMInitializeMipsTargetMC().

CompactBranchPolicy becomes an enum class, and
MipsSubtarget::useConstantIslands() becomes a non-static member.

Aided by Opus 5.5
DeltaFile
+89-0llvm/lib/Target/Mips/MipsOptions.td
+17-38llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
+15-33llvm/lib/Target/Mips/MipsTargetObjectFile.cpp
+10-34llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
+11-30llvm/lib/Target/Mips/MipsSubtarget.cpp
+13-21llvm/lib/Target/Mips/MipsISelLowering.cpp
+155-15622 files not shown
+317-27728 files

LLVM/project c0bbd6f — libc/src/__support/FPUtil/x86_64 nearest_integer.h

[libc] Improve nearest_integer for non-AVX x86 targets. (#230529)

Without AVX, _mm_round_ss and _mm_round_sd introduce false dependency of
the upper lanes that causes significant regressions for non-AVX x86
targets.

We call roundss and roundsd directly with inline asm to prevent the
false dependency for such targets.
DeltaFile
+23-0libc/src/__support/FPUtil/x86_64/nearest_integer.h
+23-01 files

LLVM/project 0017f47 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.h AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/UniformityAnalysis/AMDGPU callbr.ll

[AMDGPU] CallInst -> CallBase for divergence analysis (#228744)

This handles non-call instructions like callbr.

The test changes in infinite-loop.ll, where there are now two return
blocks (the original one + the dummy) instead of the unified return
block is a symptom of the callbr in those functions being not marked as
divergent anymore.

This patch was hand-manufactured using Neovim.

---------

Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
DeltaFile
+109-91llvm/test/CodeGen/AMDGPU/infinite-loop.ll
+38-38llvm/test/CodeGen/AMDGPU/si-unify-exit-multiple-unreachables.ll
+40-0llvm/test/Analysis/UniformityAnalysis/AMDGPU/callbr.ll
+14-14llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+202-1445 files

LLVM/project 508900c — llvm/lib/Target/AArch64 AArch64SVEInstrInfo.td, llvm/test/CodeGen/AArch64 sve2-min-max-clamp.ll

[AArch64] Allow commuted `min` operands in clamp patterns (#230693)
DeltaFile
+11-19llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+30-0llvm/test/CodeGen/AArch64/sve2-min-max-clamp.ll
+41-192 files

LLVM/project 84cd433 — llvm/lib/Passes PassBuilderPipelines.cpp, llvm/test/Other opt-pipeline-attributor-enable.ll

Passes: Replace FunctionAttrs with attributor-light when it is enabled (#231157)

attributor-light is meant to replace FunctionAttrs, but with
-attributor-enable=light both ran. Use AttributorLightCGSCCPass in
place of each PostOrderFunctionAttrsPass, and AttributorLightPass in
place of each ReversePostOrderFunctionAttrsPass, in the default,
ThinLTO and full LTO pipelines.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+29-9llvm/lib/Passes/PassBuilderPipelines.cpp
+18-3llvm/test/Other/opt-pipeline-attributor-enable.ll
+47-122 files

LLVM/project 4deaffe — clang/docs OpenMPSupport.md

[NFC] Update `OpenMPSupport.md` (#231195)

Update to reflect current state of loop optimizations.
DeltaFile
+5-2clang/docs/OpenMPSupport.md
+5-21 files

LLVM/project e442017 — llvm/lib/Transforms/Coroutines CoroSplit.cpp, llvm/test/Transforms/Coroutines swift-async-projection-dbg.ll

[Coroutines] Avoid line 0 locations for async context projections (#231221)

CoroSplit inlines a call to the async context projection function, which
usually has line zero location as it is compiler generated boilerplate.

If that location has line zero, DwarfDebug skips the projection when it
places prologue_end, so the projection ends up in the prologue. This is
the same problem that 2cf550a04041 ([DebugInfo] Force early line-zero
calls to have meaningful locations, #156850) fixed for line 0 calls:
someone entering the function at prologue_end breaks in after the call
has completed.

If the suspend point has a line 0 location, give the projection the
location of the first instruction after the suspend point with a
non-zero line. We already do this for other intrinsics here.

Assisted by claude
DeltaFile
+88-0llvm/test/Transforms/Coroutines/swift-async-projection-dbg.ll
+8-2llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+96-22 files