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

Address review: fix -Wenum-compare build failure, add structural hash, expand flag coverage
DeltaFile
+115-2mlir/test/CAPI/ir.c
+11-16mlir/lib/CAPI/IR/IR.cpp
+19-7mlir/include/mlir-c/IR.h
+145-253 files

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

[mlir-c] Add structural operation equivalence
DeltaFile
+70-0mlir/test/CAPI/ir.c
+25-0mlir/include/mlir-c/IR.h
+24-0mlir/lib/CAPI/IR/IR.cpp
+119-03 files

LLVM/project 9947b7fmlir/cmake/modules AddMLIR.cmake, mlir/lib CMakeLists.txt

[MLIR][CMake] Extend MLIRIR PCH reuse to transitive dependants

llvm_update_pch() only offers a PCH to targets that name the defining
library as a *direct* dependency, because across LLVM subprojects a
transitively reused PCH drags in unrelated headers and causes name
collisions. Within MLIR that concern is much weaker: mlir/IR/pch.h holds
MLIR core headers that essentially every MLIR library includes anyway.

Add mlir_reuse_ir_pch(), which offers MLIRIR's PCH to any target that
actually reaches MLIRIR through its link graph. The reachability check
matters: a PCH containing MLIR IR headers emits out-of-line symbols that
only libMLIRIR provides, so handing it to a Support-only target such as
tblgen-lsp-server breaks the link.

The helper is called from add_mlir_library() and add_mlir_tool(), and
again from mlir_target_link_libraries(), where most tests, unittests and
libMLIR.so-avoiding libraries actually attach their MLIR dependencies. It
is idempotent and skips targets that define their own PCH, that opt out
with DISABLE_PCH_REUSE, that override RTTI/EH, or that contain C/ObjC

    [18 lines not shown]
DeltaFile
+135-2mlir/cmake/modules/AddMLIR.cmake
+7-4mlir/lib/CMakeLists.txt
+5-0mlir/lib/Tools/PDLL/ODS/CMakeLists.txt
+5-0mlir/lib/Tools/PDLL/AST/CMakeLists.txt
+1-0mlir/unittests/CMakeLists.txt
+153-65 files

LLVM/project 6b98f82cmake/Modules GetTripleCMakeSystemName.cmake, llvm/include/llvm/TargetParser TripleName.def

cmake: Derive CMake system name from a triple via new mechanism (#208773)
DeltaFile
+118-110llvm/include/llvm/TargetParser/TripleName.def
+206-0llvm/test/tools/TargetParser/get_triple_system_name_test.py
+148-0llvm/utils/get_triple_system_name.py
+40-0cmake/Modules/GetTripleCMakeSystemName.cmake
+4-4llvm/lib/TargetParser/Triple.cpp
+6-0llvm/test/tools/TargetParser/get-triple-system-name.test
+522-1146 files

LLVM/project 2605272llvm/lib/Target/RISCV RISCVInstrInfoC.td, llvm/test/MC/RISCV priv-invalid.s

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+465-0llvm/test/MC/RISCV/rvy/rvyc-valid-load-store.s
+199-0llvm/test/MC/RISCV/rvy/rvy-valid-load-store.s
+91-95llvm/lib/Target/RISCV/RISCVInstrInfoC.td
+170-0llvm/test/TableGen/getRegClassFromMatchKind.td
+158-0llvm/test/MC/RISCV/rvy/rvyc-invalid-load-store.s
+91-47llvm/test/MC/RISCV/priv-invalid.s
+1,174-14252 files not shown
+2,275-47258 files

LLVM/project de41429llvm/lib/Target/RISCV RISCVInstrInfo.td RISCVInstrInfoC.td, llvm/test/MC/RISCV target-abi-invalid.s priv-invalid.s

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

Created using spr 1.3.8-beta.1-arichardson

[skip ci]
DeltaFile
+82-88llvm/lib/Target/RISCV/RISCVInstrInfoC.td
+170-0llvm/test/TableGen/getRegClassFromMatchKind.td
+91-47llvm/test/MC/RISCV/priv-invalid.s
+61-59llvm/test/MC/RISCV/target-abi-invalid.s
+44-50llvm/lib/Target/RISCV/RISCVInstrInfo.td
+85-1llvm/utils/TableGen/AsmMatcherEmitter.cpp
+533-24536 files not shown
+816-40442 files

LLVM/project f9a6d13llvm/lib/Transforms/InstCombine InstCombineLoadStoreAlloca.cpp, llvm/test/Transforms/InstCombine atomic.ll

[InstCombine] Don't change the type of elementwise atomic loads
DeltaFile
+11-0llvm/test/Transforms/InstCombine/atomic.ll
+3-0llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+14-02 files

LLVM/project 586a5ballvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.cpp

add more error cases

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+12-6llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+11-6llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+4-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+27-163 files

LLVM/project a77fad1llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1-arichardson

[skip ci]
DeltaFile
+4-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+1-2llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+7-103 files

LLVM/project c27bee2llvm/lib/Target/AMDGPU VOP3PInstructions.td SIInstrInfo.h

[AMDGPU] Generalize MFMA VGPR->AGPR opcode mapping (NFC) (#213274)

Move the VGPR/AGPR pairing out of MFMATable into a generalized
AGPRFormTable class and rename getMFMASrcCVDstAGPROp to getAGPRFormOp.
MFMATable inherits AGPRFormTable, so the instantiation sites and the
generated table are unchanged.

Other instruction families with paired VGPR/AGPR pseudos, such as DS,
can now be tagged with AGPRFormTable.

Related to #168983
DeltaFile
+10-5llvm/lib/Target/AMDGPU/SIInstrInfo.td
+3-4llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+1-5llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+3-3llvm/lib/Target/AMDGPU/SIInstrInfo.h
+3-3llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+20-205 files

LLVM/project 3c3a18eclang/include/clang/Basic OffloadArch.h, clang/lib/Basic Cuda.cpp OffloadArch.cpp

clang: Store vendor GPU kinds in OffloadArch instead of re-listing GPUs (#213362)

OffloadArch was a flat enum that hand-duplicated every AMDGPU and NVPTX
target, plus a few edge cases. This was yet another place that needed
updating every time a new target is added, which should now be avoided.
Replace with a tagged union-like scheme.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+103-143clang/include/clang/Basic/OffloadArch.h
+73-136clang/lib/Basic/OffloadArch.cpp
+42-19clang/unittests/Basic/OffloadArchTest.cpp
+12-28clang/lib/Basic/Cuda.cpp
+27-10clang/test/Misc/target-invalid-cpu-note/nvptx.c
+12-14clang/lib/Driver/Driver.cpp
+269-3508 files not shown
+304-38114 files

LLVM/project 521ac0dllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.cpp

clang-format

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+4-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+1-2llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+7-103 files

LLVM/project c72e559mlir/include/mlir/IR pch.h, mlir/lib CMakeLists.txt

[MLIR][CMake] Add PCH for MLIRIR

Add a precompiled header for MLIRIR, following the infrastructure added in
llvm#176420 and the per-component PCHs for llvm/IR (llvm#183303),
llvm/CodeGen (llvm#183346) and clang/AST (llvm#183358).

The header list was selected with the same methodology: compile all 1173
CUs under mlir/lib with -ftime-trace, rank mlir headers by the time spent
parsing them (including transitively included headers), then greedily pick
the header with the largest marginal coverage until the marginal gain
falls off. Candidates were restricted to headers already reachable from
MLIRIR's own sources, so the PCH does not invert the library layering.

Over the mlir/lib CUs, the selected set covers 1227s of 3674s total
frontend time (33%). On a Release+assertions build of mlir-opt
(Apple M-series, -j16), clean build wall time goes from 468.3s to 440.8s
(-5.9%); 715 of 1536 MLIR objects reuse the PCH.

mlir/lib/CMakeLists.txt gains an explicit add_subdirectory(IR) before the

    [7 lines not shown]
DeltaFile
+47-0mlir/include/mlir/IR/pch.h
+8-8mlir/lib/Tools/mlir-lsp-server/LSPServer.cpp
+4-1mlir/lib/CMakeLists.txt
+3-0mlir/lib/IR/CMakeLists.txt
+62-94 files

LLVM/project b12686dllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+61-59llvm/test/MC/RISCV/target-abi-invalid.s
+67-1llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+36-30llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+10-16llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+8-14llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+10-7llvm/lib/TargetParser/RISCVISAInfo.cpp
+192-1278 files not shown
+241-14214 files

LLVM/project 733727dllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

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

Created using spr 1.3.8-beta.1-arichardson

[skip ci]
DeltaFile
+61-59llvm/test/MC/RISCV/target-abi-invalid.s
+36-30llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+42-1llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+10-16llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+8-14llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+6-6llvm/test/CodeGen/RISCV/target-abi-invalid.ll
+163-1264 files not shown
+187-13210 files

LLVM/project 3d7fc37llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+61-59llvm/test/MC/RISCV/target-abi-invalid.s
+36-30llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+42-1llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+10-16llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+8-14llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+6-6llvm/test/CodeGen/RISCV/target-abi-invalid.ll
+163-1264 files not shown
+187-13210 files

LLVM/project b94b699llvm/lib/TargetParser RISCVISAInfo.cpp, llvm/unittests/Target/RISCV CMakeLists.txt RISCVBaseInfoTest.cpp

[RISCV] Fix ISCVISAInfo::computeDefaultABI() result for xcheriot (#212129)

XCheriot was not considered in this function, so RV32E+XCheriot
defaulted
to ilp32e instead of cheriot when no -target-abi was given.

Since this function does not have unit test coverage, this adds new
tests
for the ABI inference functions: RISCVISAInfo::computeDefaultABI() and
RISCVABI::computeTargetABI.

This change was created with the help of AI tools
DeltaFile
+50-0llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+21-0llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+2-0llvm/lib/TargetParser/RISCVISAInfo.cpp
+1-0llvm/unittests/Target/RISCV/CMakeLists.txt
+74-04 files

LLVM/project d9e6999llvm/lib/Target/X86/MCTargetDesc X86AsmBackend.cpp

[X86AsmBackend] Define reset() hook (#213409)

Noticed when reviewing #175830: MCObjectStreamer::reset frees the
fragments PendingBA and PrevInstPosition point into, but X86AsmBackend
keeps them. Define the hook.
DeltaFile
+7-0llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+7-01 files

LLVM/project dbefa87clang/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 60be55cclang/include/clang/Basic OffloadArch.h, clang/lib/Basic Cuda.cpp OffloadArch.cpp

clang: Store vendor GPU kinds in OffloadArch instead of re-listing GPUs

OffloadArch was a flat enum that hand-duplicated every AMDGPU and NVPTX
targets, plus a few edge cases. This was yet another place that needed
updating every time a new target is added, which should now be avoided.
Replace with a tagged union-like scheme.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+103-143clang/include/clang/Basic/OffloadArch.h
+73-136clang/lib/Basic/OffloadArch.cpp
+42-19clang/unittests/Basic/OffloadArchTest.cpp
+12-28clang/lib/Basic/Cuda.cpp
+27-10clang/test/Misc/target-invalid-cpu-note/nvptx.c
+12-14clang/lib/Driver/Driver.cpp
+269-3508 files not shown
+304-38114 files

LLVM/project 9a15298lldb/test/API/functionalities/json/symbol-file TestSymbolFileJSON.py

[lldb][test] Skip the JSON symbol file test on WebAssembly (#213407)

A JSON symbol file requires the UUID of the module it describes, and a
WebAssembly module carries no UUID.
DeltaFile
+1-0lldb/test/API/functionalities/json/symbol-file/TestSymbolFileJSON.py
+1-01 files

LLVM/project e89830dclang/tools/clang-format git-clang-format

Add option to format a whole file using git-clang-format (#204336)

Today, git-clang-format will only format lines which have been modified.
However, in some cases, that's not sufficient to get a "clean" file
which would be unmodified by running `clang-format` manually.

I've got a minimal repro using the default clang-format rules. Setup a
new git repository and create a commit with an empty file:

```
mkdir /tmp/bla
cd /tmp/bla
git init
touch t.cpp
git add t.cpp
git commit -m "V1"
```

Add a line to that file containing a comment:

    [27 lines not shown]
DeltaFile
+29-16clang/tools/clang-format/git-clang-format
+29-161 files

LLVM/project d857103flang/lib/Lower ConvertExpr.cpp, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.512bit.ll bf16.ll

rebase, fix commit message

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+9,385-9,006llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+5,575-5,393llvm/test/CodeGen/AMDGPU/maximumnum.ll
+5,454-5,259llvm/test/CodeGen/AMDGPU/minimumnum.ll
+4,728-4,968llvm/test/CodeGen/AMDGPU/bf16.ll
+3,972-3,823llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+0-7,750flang/lib/Lower/ConvertExpr.cpp
+29,114-36,1998,245 files not shown
+332,421-267,9648,251 files

LLVM/project 7f07052llvm/docs LangRef.rst, llvm/lib/Support UnicodeNameToCodepointGenerated.cpp

rebase after change to no longer allow direct access to the regclass

Created using spr 1.3.8-beta.1-arichardson
DeltaFile
+46,326-45,879llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,784-36,416llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+24,053-23,916llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+27,856-11,102llvm/test/CodeGen/RISCV/clmul.ll
+12,227-23,140llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+0-33,097llvm/docs/LangRef.rst
+136,246-173,55027,760 files not shown
+1,812,315-1,188,72527,766 files

LLVM/project e4d410ellvm/docs LangRef.rst, llvm/lib/Support UnicodeNameToCodepointGenerated.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1-arichardson

[skip ci]
DeltaFile
+46,326-45,879llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,784-36,416llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+24,053-23,916llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+27,856-11,102llvm/test/CodeGen/RISCV/clmul.ll
+12,227-23,140llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+0-33,097llvm/docs/LangRef.rst
+136,246-173,55027,759 files not shown
+1,812,303-1,188,71227,765 files

LLVM/project 56eb9ablldb/source/Plugins/Process/wasm UnwindWasm.h UnwindWasm.cpp, lldb/test/API/functionalities/gdb_remote_client TestWasm.py

[lldb] Bound a WebAssembly backtrace by the target's maximum depth (#213397)

Only UnwindLLDB honored target.process.thread.max-backtrace-depth, so
UnwindWasm reported every frame the stub sent and a stack that recursed
without end was walked to its end.

Bound the frame count by the depth on every query rather than dropping
the frames that exceed it. A Wasm call stack arrives whole on the first
query, so a depth lowered after that has to still apply, which is when a
user reaches for it. The synthetic call frame addresses stay derived
from the whole stack, so the order of the frames does not depend on the
depth.
DeltaFile
+39-0lldb/test/API/functionalities/gdb_remote_client/TestWasm.py
+12-3lldb/source/Plugins/Process/wasm/UnwindWasm.cpp
+4-0lldb/source/Plugins/Process/wasm/UnwindWasm.h
+55-33 files

LLVM/project 9466be2llvm/lib/Target/X86 X86WinEHUnwindV3.cpp, llvm/test/CodeGen/X86 win64-eh-unwindv3-egpr-funclet.ll win64-eh-unwindv3-egpr-per-function.ll

[X86][APX] Fix per-function V3 unwind for EGPR functions on Windows x64 (#212924)

A function that saves a callee-saved EGPR (R16-R31) cannot be encoded with V1/V2 unwind info, so it must use V3 even when the module default stays on V1/V2 (e.g. an APX clone created by auto-dispatch alongside a baseline generic clone). The previous code rejected such functions with a recoverable backend diagnostic ("EGPR (R16-R31) requires V3 unwind info on Windows x64") instead of emitting valid V3 unwind info.

Introduce a single shared predicate, requiresWinX64UnwindV3(MF), that returns true when the whole module is in V3 mode, or when the function needs an unwind table and may use EGPR. It is consumed by X86FrameLowering (SEH prolog/epilog layout), the X86WinEHUnwindV2 pass (which skips such functions), and the X86WinEHUnwindV3 pass (which stamps a per-function .seh_unwindversion 3 on every WinEH frame -- the entry block and each funclet). Also widen the SEH_UnwindVersion pseudo operand from i1imm to i8imm since it holds 1, 2 or 3.
DeltaFile
+53-0llvm/test/CodeGen/X86/win64-eh-unwindv3-egpr-version-switch-v1.ll
+30-21llvm/lib/Target/X86/X86WinEHUnwindV3.cpp
+47-0llvm/test/CodeGen/X86/win64-eh-unwindv3-egpr-version-switch.ll
+39-0llvm/test/CodeGen/X86/win64-eh-unwindv3-egpr-v2-module.ll
+32-0llvm/test/CodeGen/X86/win64-eh-unwindv3-egpr-per-function.ll
+31-0llvm/test/CodeGen/X86/win64-eh-unwindv3-egpr-funclet.ll
+232-216 files not shown
+284-4712 files

LLVM/project caaad6bllvm/test/Transforms/LoopVectorize simplify-logic.ll

[VPlan] Fix comments on logical-and/or combines. NFC (#213406)

The ordering needs to be adjusted to preserve poison blocking behaviour.
DeltaFile
+2-2llvm/test/Transforms/LoopVectorize/simplify-logic.ll
+2-21 files

LLVM/project 4d8c8ffllvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize simplify-logic.ll

Revert "[VPlan] Remove redundant x && (y && x) -> x && y combine (#213219)" (#213405)

This reverts commit 8db13de265a5f12d49147930da6d16a3ad7b40e3.

Logical ands block poison, and commuting the operands doesn't preserve
it
DeltaFile
+10-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-2llvm/test/Transforms/LoopVectorize/simplify-logic.ll
+11-62 files

LLVM/project cfb2eabllvm/test/Transforms/LoopVectorize simplify-logic.ll

[VPlan] Add tests for logical and and logical or combines. NFC (#213402)
DeltaFile
+481-0llvm/test/Transforms/LoopVectorize/simplify-logic.ll
+481-01 files