LLVM/project fcec6callvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange inner-latch-defs-iv.ll

[LoopInterchange] Bail out if a PHI would be cloned into the new latch (#212742)

The transformation stage of LoopInterchange splits the inner loop latch
and clones the necessary instructions from the original latch into the
new one. PHI nodes cannot be cloned this way, so the legality check is
supposed to reject cases where such a clone would happen. However, it
missed some cases, allowing a PHI node to be cloned and invalid IR to be
produced.

This patch fixes the issue by making the legality check follow all the
instruction trees the transformation would clone, i.e., the use-def
chains of both the exit condition and the induction variable updates,
and reject the interchange if a PHI node other than the induction PHIs
appears in them. Previously, the check only ran when the inner loop
contains subloops, only followed the use-def chains of the exit
condition, and only rejected PHI nodes placed in the latch block.

Note that this is a stop-gap solution, especially because the legality
check strongly depends on the details of the transformation stage. The

    [3 lines not shown]
DeltaFile
+28-30llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+58-0llvm/test/Transforms/LoopInterchange/inner-latch-defs-iv.ll
+86-302 files

LLVM/project ae99d61llvm/include/llvm/CodeGen/GlobalISel Localizer.h LoadStoreOpt.h, llvm/lib/CodeGen/GlobalISel Localizer.cpp LoadStoreOpt.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+54-28llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+25-10llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+1-9llvm/lib/CodeGen/GlobalISel/Localizer.cpp
+0-5llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
+2-2llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+84-556 files not shown
+90-5912 files

LLVM/project cca79dallvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h Localizer.h, llvm/lib/CodeGen/GlobalISel GlobalISel.cpp Localizer.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+54-28llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+45-23llvm/lib/CodeGen/GlobalISel/Localizer.cpp
+26-14llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
+25-10llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+4-4llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-2llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp
+156-818 files not shown
+169-8814 files

LLVM/project b29eb4bllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV condops.ll

[RISCV] Lower (select c, x, -x) -> (sub (czero_eqz x, c), (czero_nez x, c)) with Zicond. (#217181)

Assisted-by: Claude
DeltaFile
+141-0llvm/test/CodeGen/RISCV/condops.ll
+22-2llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+163-22 files

LLVM/project c515779llvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h

fix

Created using spr 1.3.7
DeltaFile
+4-0llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+4-01 files

LLVM/project 9b9a554llvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+4-0llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+4-01 files

LLVM/project 22bc01dllvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h

fix

Created using spr 1.3.7
DeltaFile
+1-1llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+1-11 files

LLVM/project 3d0ce83llvm/lib/Object GOFFObjectFile.cpp

Address comments in GOFFObjectFile.cpp
DeltaFile
+18-19llvm/lib/Object/GOFFObjectFile.cpp
+18-191 files

LLVM/project ab3c202llvm/lib/Object ArchiveWriter.cpp

Remove unnecessary new line
DeltaFile
+0-1llvm/lib/Object/ArchiveWriter.cpp
+0-11 files

LLVM/project 5a020ballvm/include/llvm/Object GOFFObjectFile.h, llvm/lib/Object GOFFObjectFile.cpp ArchiveWriter.cpp

[llvm-ar][GOFF] Implement symbol attributes for GOFF archives

z/OS archive symbol table entries contain a 32-bit attribute word
alongside each member offset. The low three bits encode:
  bit 2 (0x4): 64-bit addressing (AMODE 64)
  bit 1 (0x2): XPLink calling convention
  bit 0 (0x1): Writable Static Area (WSA)

Previously in e2c8fa0, llvm-ar wrote zero for
these attributes. This patch reads them from GOFF ESD records and stores them
in a SymbolAttrs vector parallel to the existing Symbols vector in
MemberData to emit the correct word per symbol.

These attributes are tested using `llvm-nm --print-armap` implemented in
#212830 within the LIT test.
DeltaFile
+73-0llvm/test/tools/llvm-ar/zos-symattrs.test
+37-14llvm/lib/Object/ArchiveWriter.cpp
+35-0llvm/lib/Object/GOFFObjectFile.cpp
+6-0llvm/include/llvm/Object/GOFFObjectFile.h
+151-144 files

LLVM/project b013bbfllvm/include/llvm/Object Archive.h, llvm/lib/Object Archive.cpp

[llvm-nm][GOFF] Display archive attributes in GOFF archives through --print-armap (#214527)

GOFF archive symbol table entries contain an attribute word in addition
to the archive member offset. The low three bits describe whether the
symbol is 64-bit, uses XPLink, or belongs to the WSA namespace (which
was briefly mentioned in e2c8fa09872cfacba7f73599dcf8557971ebe865).

This patch extends `llvm-nm --print-armap` to print the attribute value
(in hex)
and its decoded description beside a symbol and its corresponding member
when processing a GOFF archive. This will functionality will be used to
help
validate full support for writing GOFF archives in a subsequent llvm-ar
patch.

The output for non-z/OS archives is unchanged.
DeltaFile
+43-6llvm/tools/llvm-nm/llvm-nm.cpp
+48-0llvm/test/tools/llvm-nm/zos-armap.test
+12-0llvm/lib/Object/Archive.cpp
+12-0llvm/include/llvm/Object/Archive.h
+115-64 files

LLVM/project 6b3daeborc-rt/include/orc-rt StringExtras.h, orc-rt/include/orc-rt-utils CommandLine.h

[orc-rt] Drop iostreams from CommandLine.h via formatHelp (#217178)

Add ljust/rjust field-padding helpers to StringOutputStream (a nested
Justified type plus free ljust/rjust functions), the string-building
analogue of std::setw with std::left/std::right.

Use them to replace CommandLineParser::printHelp(std::ostream &, ...)
with formatHelp(std::string_view) -> std::string, built via
StringOutputStream. CommandLine.h no longer includes any iostream header
(<iomanip> dropped, no <ostream> added); callers that want to print
route the returned string themselves, e.g.
  std::cerr << P.formatHelp(argv[0]);

This moves the iostream dependency out of the reusable header and into
the leaf tools (host binaries) that opt into it. Updates the two check
tools and the unit test, which no longer needs a stringstream.
DeltaFile
+41-0orc-rt/test/unit/StringExtrasTest.cpp
+34-0orc-rt/include/orc-rt/StringExtras.h
+6-3orc-rt/include/orc-rt-utils/CommandLine.h
+3-3orc-rt/test/tools/orc-rt-log-check.cpp
+1-3orc-rt/test/unit/CommandLineTest.cpp
+2-2orc-rt/test/tools/orc-rt-process-info-check.cpp
+87-116 files

LLVM/project 60bd2e1llvm/test/tools/llvm-nm/GOFF symbol-types-and-sizes.ll, llvm/tools/llvm-nm llvm-nm.cpp

[llvm-nm][GOFF] Support symbol types and sizes (#207119)

Add GOFF-specific handling in llvm-nm for symbol types and sizes. GOFF
symbols are now classified using their GOFF type, allowing llvm-nm to
distinguish global/local data and text symbol,s as well as undefined
symbols.

This addition to llvm-nm is also useful to display the symbol table of
GOFF object and archives.
DeltaFile
+39-0llvm/test/tools/llvm-nm/GOFF/symbol-types-and-sizes.ll
+24-0llvm/tools/llvm-nm/llvm-nm.cpp
+63-02 files

LLVM/project 6357eb1.github/workflows premerge.yaml

Revert "[CI] Pin runners to us-west cluster" (#217191)
DeltaFile
+7-11.github/workflows/premerge.yaml
+7-111 files

LLVM/project 9835f8allvm/include/llvm/ADT FoldingSet.h

[ADT] Reland: Remove CRTP from FoldingSet and ContextualFoldingSet (NFC) (#217058)

This patch relands #216830 with a fix for MSVC build failures.

In the original patch, FoldingSetInfo was defined as a static constexpr
member variable of FoldingSetImpl. On MSVC, instantiating
FoldingSetImpl<T> (e.g. in LLVMContextImpl.h) eagerly evaluates the
static constexpr member variable and its lambdas containing
static_cast<T *>(N). When T is an incomplete type (such as AttributeImpl
forward-declared in LLVMContextImpl.h and compiled in Metadata.cpp),
this
caused MSVC to fail with C2440 because static_cast requires a complete
type.

This patch wraps FoldingSetInfo in a static getFoldingSetInfo() member
function so that instantiation is deferred until the function is
actually
called, such as during InsertNode or FindNodeOrInsertPos.

Assisted-by: Antigravity
DeltaFile
+65-100llvm/include/llvm/ADT/FoldingSet.h
+65-1001 files

LLVM/project 5d4f09bllvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h

fix

Created using spr 1.3.7
DeltaFile
+4-0llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+4-01 files

LLVM/project 739eaa0llvm/test/CodeGen/AMDGPU flat-saddr-atomics.ll llvm.amdgcn.wmma.imm.gfx1250.w32.ll

[AMDGPU] Improve the sequence for initial unclaused VMEM (#216897)
DeltaFile
+250-250llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.gfx1250.w32.ll
+232-232llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+196-196llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.imod.gfx1250.w32.ll
+183-183llvm/test/CodeGen/AMDGPU/fcanonicalize.ll
+174-174llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.imm.gfx1250.w32.ll
+166-166llvm/test/CodeGen/AMDGPU/flat-saddr-atomics.ll
+1,201-1,201200 files not shown
+6,443-6,354206 files

LLVM/project 48b2df9llvm/lib/CodeGen/GlobalISel Localizer.cpp

formatting

Created using spr 1.3.7
DeltaFile
+1-2llvm/lib/CodeGen/GlobalISel/Localizer.cpp
+1-21 files

LLVM/project b7966efllvm/include/llvm/CodeGen/GlobalISel Localizer.h LoadStoreOpt.h, llvm/lib/CodeGen/GlobalISel Localizer.cpp LoadStoreOpt.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+54-28llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+24-13llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+1-8llvm/lib/CodeGen/GlobalISel/Localizer.cpp
+0-5llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
+2-2llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+83-576 files not shown
+89-6112 files

LLVM/project 3b94265llvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h, llvm/lib/CodeGen/GlobalISel LoadStoreOpt.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+54-28llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+24-13llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+2-2llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+1-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging-debug.mir
+1-1llvm/test/CodeGen/AArch64/GlobalISel/merge-stores-truncating.mir
+84-464 files not shown
+88-4810 files

LLVM/project daaf4b4llvm/lib/Target/M68k M68kISelLowering.cpp

[M68k] Use ISD::getSetCCInverse instead of ISD::GlobalISel::getSetCCInverse. NFCI (#216871)

It's odd to use a GlobalISel named function in SelectionDAG code. This
code path isn't exercised by lit, but I think this should be equivalent.
DeltaFile
+1-1llvm/lib/Target/M68k/M68kISelLowering.cpp
+1-11 files

LLVM/project 40b2adf.github/workflows premerge.yaml

Revert "[CI] Pin runners to us-west cluster (#217111)"

This reverts commit 72be246ecd1ddb00a3897dbbd4e210f4f6dc13a4.
DeltaFile
+7-11.github/workflows/premerge.yaml
+7-111 files

LLVM/project d822c75llvm/include/llvm/CodeGen/GlobalISel LoadStoreOpt.h, llvm/lib/CodeGen/GlobalISel LoadStoreOpt.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+54-28llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+24-13llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+2-2llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging.mir
+1-1llvm/test/CodeGen/AArch64/GlobalISel/store-merging-debug.mir
+1-1llvm/test/CodeGen/AArch64/GlobalISel/merge-stores-truncating.mir
+84-464 files not shown
+88-4810 files

LLVM/project f2c0eacllvm/test/Transforms/LoopFusion different_guards.ll

[LoopFusion] Remove test dependency on assert (NFC) (#217180)
DeltaFile
+40-3llvm/test/Transforms/LoopFusion/different_guards.ll
+40-31 files

LLVM/project c406304llvm/include/llvm InitializePasses.h, llvm/include/llvm/CodeGen ImplicitNullChecks.h

[NewPM] Port ImplicitNullChecks to the new pass manager (#216965)

Adds a newPM pass for ImplicitNullChecks.

- Refactors base logic into an ImplicitNullChecks class
- Renames old pass with the "Legacy" suffix
- Adds the new pass manager pass ImplicitNullChecksPass
- Updates MachinePassRegistry.def, PassBuilder, and CodeGenPassBuilder
- Updated existing .mir tests to also test with the New Pass Manager

Assisted-by: Gemini / Next
DeltaFile
+58-34llvm/lib/CodeGen/ImplicitNullChecks.cpp
+29-0llvm/include/llvm/CodeGen/ImplicitNullChecks.h
+1-1llvm/lib/CodeGen/CodeGen.cpp
+1-1llvm/include/llvm/Passes/MachinePassRegistry.def
+1-1llvm/include/llvm/InitializePasses.h
+1-0llvm/test/CodeGen/X86/implicit-null-chk-reg-rewrite.mir
+91-373 files not shown
+94-379 files

LLVM/project ea75745clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/CodeGen call-conv-lowering-x86_64-empty.cpp

[CIR] Handle an empty C++ class in x86_64 callconv lowering (#214742)

CIR lays a C++ empty class out as a record that is nothing but padding,
and isSupportedType rejected every padded record, so any signature
naming one failed the pass with an NYI. Ordinary C++ hits this
constantly through tag dispatch, allocators, and empty bases.

Implement empty C++ class support. Every record member now carries a
kind, so a record holds no data exactly when none of them is marked
data, which `RecordType::isEmptyForABI()` answers and the pass reads. An
empty record then maps with no fields, so the classifier drops it on its
own.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+268-0clang/test/CIR/Transforms/abi-lowering/x86_64-empty-class.cir
+179-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-empty.cpp
+50-4clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+35-9clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+532-134 files

LLVM/project 92ec4d7llvm/lib/Object Archive.cpp

Add assert into getZOSAttributes()
DeltaFile
+2-2llvm/lib/Object/Archive.cpp
+2-21 files

LLVM/project d62d5d1llvm/test/tools/llvm-nm zos-armap.test

Update test comment.
DeltaFile
+2-2llvm/test/tools/llvm-nm/zos-armap.test
+2-21 files

LLVM/project 775d99bllvm/include/llvm/Object Archive.h, llvm/test/tools/llvm-nm zos-armap.test

Address review comments.
DeltaFile
+19-20llvm/tools/llvm-nm/llvm-nm.cpp
+21-15llvm/test/tools/llvm-nm/zos-armap.test
+3-1llvm/include/llvm/Object/Archive.h
+43-363 files

LLVM/project d97bed5llvm/include/llvm/Object Archive.h, llvm/lib/Object Archive.cpp

[llvm-nm][GOFF] Display archive attributes in GOFF archives through --print-armap

GOFF archive symbol table entries contain an attribute word in addition
to the archive member offset. The low three bits describe whether the symbol is
64-bit, uses XPLink, or belongs to the WSA namespace (which was briefly mentioned
in e2c8fa09872cfacba7f73599dcf8557971ebe865).

This patch extends `llvm-nm --print-armap` to print the attribute value (in hex) and
its decoded description beside a symbol and its corresponding member when processing
a GOFF archive. This will functionality will be used to help validate full support for writing
GOFF archives in a subsequent llvm-ar patch.

The output for non-z/OS archives is unchanged.
DeltaFile
+44-5llvm/tools/llvm-nm/llvm-nm.cpp
+42-0llvm/test/tools/llvm-nm/zos-armap.test
+12-0llvm/lib/Object/Archive.cpp
+10-0llvm/include/llvm/Object/Archive.h
+108-54 files