LLVM/project 42009aa — offload/include device.h, offload/liboffload/src OffloadImpl.cpp

Revert "[Offload][Omp] Destroy programs when unregistering images (#239239)"

This reverts commit bd49d77ae3c07c30bcceff27d27b4ef756f8b1b5.
DeltaFile
+6-115offload/libompaccsupport/device.cpp
+0-95offload/test/offloading/unload_declare_target.c
+14-48offload/libompaccsupport/PluginManager.cpp
+0-33offload/unittests/OffloadAPI/program/olDestroyProgram.cpp
+1-24offload/include/device.h
+5-10offload/liboffload/src/OffloadImpl.cpp
+26-3253 files not shown
+26-3419 files

LLVM/project e6c8080 — clang/test/CIR/CodeGen call-conv-lowering-amdgpu-one-field-struct.c

add source test
DeltaFile
+116-0clang/test/CIR/CodeGen/call-conv-lowering-amdgpu-one-field-struct.c
+116-01 files

LLVM/project 1b1fed4 — mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Add 32-bit multicast support to mbarrier ops (#240753)

Add an optional i32 multicast_mask operand to the following NVVM
operations:

- nvvm.mbarrier.expect_tx
- nvvm.mbarrier.complete_tx
- nvvm.mbarrier.arrive
- nvvm.mbarrier.arrive_drop
- nvvm.mbarrier.arrive.expect_tx
- nvvm.mbarrier.arrive_drop.expect_tx

In addition, it updates some of the mbarrier callers to pass empty mask
while invoking the builder.
DeltaFile
+105-0mlir/test/Target/LLVMIR/nvvm/mbar_invalid.mlir
+39-23mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+53-8mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+42-0mlir/test/Target/LLVMIR/nvvm/mbar_multicast.mlir
+24-0mlir/test/Target/LLVMIR/nvvm/mbar_arrive_drop.mlir
+23-0mlir/test/Target/LLVMIR/nvvm/mbar_arrive.mlir
+286-316 files not shown
+358-3712 files

LLVM/project 1ca98ca — clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp, mlir/lib/Dialect/Quant/IR QuantDialectBytecode.cpp

[mlir][ODS] Include headers required by generated bytecode readers and writers

The generated bytecode readers and writers use `DialectBytecodeReader`,
`DialectBytecodeWriter` and `TypeSwitch` but did not include the headers
declaring them. They therefore relied on the surrounding source file to
include these headers first.

The generated readers and writers now include
`BytecodeImplementation.h` and `TypeSwitch.h`.

As these includes must not be expanded within a namespace, all users
now include the generated file at global scope rather than within their
anonymous namespace.

Similar to #236155 and #238735 but for the bytecode generator.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+15-0mlir/test/mlir-tblgen/cpp-includes-bytecode.td
+12-0mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp
+1-4mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+4-1clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+2-1mlir/lib/IR/BuiltinDialectBytecode.cpp
+2-1mlir/lib/Dialect/Quant/IR/QuantDialectBytecode.cpp
+36-71 files not shown
+38-87 files

LLVM/project 20bd524 — clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp, mlir/include/mlir/IR BytecodeBase.td

[mlir][ODS] Fully qualify names in generated bytecode readers and writers (#241224)

The code generated by `-gen-bytecode` referred to MLIR and LLVM
constructs such as `MLIRContext`, `DialectBytecodeReader`,
`LogicalResult`, `TypeSwitch` and `getChecked` without qualification, as
did the snippets in `BytecodeBase.td`. It therefore only compiled in a
source file with `using namespace mlir;`.

This PR fully qualifies all names emitted by the generator and by
`BytecodeBase.td`. Performed a minor refactor while doing so that also
fixes an error message and makes the code less ad-hoc

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+75-64mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp
+23-19mlir/include/mlir/IR/BytecodeBase.td
+5-5mlir/test/mlir-tblgen/bytecode-write.td
+0-5clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+1-1mlir/test/mlir-tblgen/bytecode-reserved.td
+1-1mlir/test/Bytecode/bytecode_callback_full_override.mlir
+105-951 files not shown
+107-957 files

LLVM/project 6f854f0 — llvm/lib/Target/AMDGPU SILowerI1Copies.cpp SILoadStoreOptimizer.cpp

AMDGPU: Stop using getUniqueVRegDef in SSA passes (#241717)
DeltaFile
+3-4llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+3-3llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+2-2llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
+8-93 files

LLVM/project 0c13f20 — clang/include/clang/AST Decl.h DeclBase.h, clang/lib/AST DeclBase.cpp Decl.cpp

Address comments

Created using spr 1.3.6-beta.1
DeltaFile
+7-12clang/include/clang/AST/DeclBase.h
+8-10clang/lib/AST/Decl.cpp
+12-3clang/lib/AST/DeclBase.cpp
+4-5clang/lib/Basic/Diagnostic.cpp
+4-5clang/include/clang/AST/Decl.h
+3-5clang/lib/Serialization/ASTWriter.cpp
+38-406 files not shown
+47-5012 files

LLVM/project 4a85bd5 — clang/include/clang/AST Decl.h DeclBase.h, clang/lib/AST DeclCXX.cpp DeclObjC.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.6-beta.1

[skip ci]
DeltaFile
+7-12clang/include/clang/AST/DeclBase.h
+8-10clang/lib/AST/Decl.cpp
+12-3clang/lib/AST/DeclBase.cpp
+4-5clang/include/clang/AST/Decl.h
+3-3clang/lib/AST/DeclObjC.cpp
+2-2clang/lib/AST/DeclCXX.cpp
+36-354 files not shown
+40-4010 files

LLVM/project 40cdba3 — mlir/include/mlir/IR OpImplementation.h, mlir/include/mlir/Interfaces FoldInterfaces.h DataLayoutInterfaces.h

[mlir][ODS] Include header required by generated dialect interface declarations (#241172)

Generated dialect interface declarations derive from
`mlir::DialectInterface::Base` but did not include the header declaring
it. They therefore relied on the surrounding source file to include it
first.

The dialect interface declarations now include `DialectInterface.h`.
Headers that only included it for the generated code no longer need to
and drop the include. Includes of headers that the hand-written code
uses directly are kept, even when the generated code includes them as
well.

Similar to #236155 and #238735 but for the dialect interface generator.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+14-0mlir/test/mlir-tblgen/cpp-includes-dialect-interface.td
+4-0mlir/tools/mlir-tblgen/DialectInterfacesGen.cpp
+0-1mlir/include/mlir/Reducer/ReductionPatternInterface.h
+0-1mlir/include/mlir/Interfaces/FoldInterfaces.h
+0-1mlir/include/mlir/Interfaces/DataLayoutInterfaces.h
+0-1mlir/include/mlir/IR/OpImplementation.h
+18-43 files not shown
+18-79 files

LLVM/project f1ca157 — clang/test/CodeGen/RISCV rvp-intrinsics.c, cross-project-tests/intrinsic-header-tests riscv_packed_simd.c

[RISCV][P-ext] Add scalar ssh1sadd intrinsic (#239234)

Add the scalar Shift-Add intrinsic from the P-extension intrinsic spec:

https://github.com/riscv/riscv-p-spec/blob/master/P-ext-intrinsics.adoc#shift-add

- `__riscv_ssh1sadd_i32`
DeltaFile
+18-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+16-0llvm/test/CodeGen/RISCV/rvp-scalar.ll
+12-0llvm/test/CodeGen/RISCV/rvp-scalar-rv64.ll
+7-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+7-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+7-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+67-34 files not shown
+81-310 files

LLVM/project cd8c455 — llvm/include/llvm/DebugInfo/DWARF DWARFVerifier.h, llvm/lib/DebugInfo/DWARF DWARFVerifier.cpp

[DWARFVerifier] Warn about local entities missing from abstract subprograms (#236258)

Function-local types and imported entities should be available to all
instances of a subprogram, whether inlined or out-of-line. They should
therefore be placed in the abstract instance .

LLVM still misplaces some of local types in the out-of-line instance,
leaving them unavailable to inlined instances.

This patch adds a verifier warning for such cases. VLA types, which may
belong to a particular concrete instance, are not affected by the
warning.

Current LLVM output triggers this warning for every mentioned kind of
types; PR#230866 is intended to fix these cases. Misplaced local imports
have been fixed ~ LLVM17 and doesn't trigger the warning today.
DeltaFile
+220-0llvm/test/tools/llvm-dwarfdump/X86/verify_local_entities_abstract_origin.s
+50-0llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
+11-0llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
+281-03 files

LLVM/project 5db78bb — llvm/test/tools/llubi intr_vp_merge.ll, llvm/tools/llubi/lib Interpreter.cpp

[llubi] Add support for vp.merge

A vp.merge is unique from other VP intrinsics in that the lanes past EVL (or the pivot as the langref calls it) aren't poison, they're taken from the false branch.

It's defined in terms of `select %EVLMask, %true, %false`. I've factored out the SelectInst logic so it can be shared. But it can be duplicated if reviewers prefer.

Assisted-by: Opus 5.5
DeltaFile
+31-16llvm/tools/llubi/lib/Interpreter.cpp
+38-0llvm/test/tools/llubi/intr_vp_merge.ll
+69-162 files

LLVM/project 0801d06 — clang/lib/Headers hlx_hexagon_protos.h, libc/utils/docgen math.yaml

Merge branch 'main' into users/zero9178/ods-dialect-interface-includes
DeltaFile
+1,457-1,437llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+1,308-1,292llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+1,208-1,190llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+1,086-1,074llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+1,945-0libc/utils/docgen/math.yaml
+1,822-0clang/lib/Headers/hlx_hexagon_protos.h
+8,826-4,9932,433 files not shown
+60,697-34,5522,439 files

LLVM/project 20a8c98 — clang/lib/Headers hlx_hexagon_protos.h, libc/utils/docgen math.yaml

Merge branch 'main' into users/zero9178/ods-op-partitioning
DeltaFile
+1,457-1,437llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+1,308-1,292llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+1,208-1,190llvm/test/Transforms/Util/DeclareRuntimeLibcalls/ppc.ll
+1,086-1,074llvm/test/Transforms/Util/DeclareRuntimeLibcalls/bsd.ll
+1,945-0libc/utils/docgen/math.yaml
+1,822-0clang/lib/Headers/hlx_hexagon_protos.h
+8,826-4,9932,447 files not shown
+60,872-34,6022,453 files

LLVM/project cfbdf67 — llvm/include/llvm/IR RuntimeLibcalls.h, llvm/lib/IR RuntimeLibcalls.cpp

[RuntimeLibcalls] Model wchar_t arguments in libcall signatures

RuntimeLibcalls could describe int, size_t and several other C types
but had no way to describe wchar_t, so a libcall taking one could not
be declared with the correct parameter type and extension attribute.
The width of wchar_t is not a property of the triple alone: it can be
overridden by the wchar_size module flag, as -fshort-wchar does.

Add a WChar FuncArgType that converts to an integer of
Module::getWCharSize() bits, and derive its extension attribute in
RuntimeLibcallsInfo::getExtAttrForWCharParam.

Declare wmemset using the new type. A wchar_t as wide as int is
sign-extended wherever int is, so targets such as RISC-V, MIPS, PowerPC
and SystemZ now get signext on it, while AIX, z/OS and VE, where it is
unsigned, get zeroext.

Assisted-by: Claude
DeltaFile
+50-0llvm/lib/IR/RuntimeLibcalls.cpp
+39-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-default.ll
+29-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/wchar-short.ll
+5-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aarch64.ll
+5-0llvm/include/llvm/IR/RuntimeLibcalls.h
+4-0llvm/test/Transforms/Util/DeclareRuntimeLibcalls/windows.ll
+132-016 files not shown
+159-022 files

LLVM/project b900cf0 — clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp, mlir/lib/Dialect/Quant/IR QuantDialectBytecode.cpp

[mlir][ODS] Include headers required by generated bytecode readers and writers

The generated bytecode readers and writers use `DialectBytecodeReader`,
`DialectBytecodeWriter` and `TypeSwitch` but did not include the headers
declaring them. They therefore relied on the surrounding source file to
include these headers first.

The generated readers and writers now include
`BytecodeImplementation.h` and `TypeSwitch.h`.

As these includes must not be expanded within a namespace, all users
now include the generated file at global scope rather than within their
anonymous namespace.

Similar to #236155 and #238735 but for the bytecode generator.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+15-0mlir/test/mlir-tblgen/cpp-includes-bytecode.td
+12-0mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp
+1-4mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+4-1clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+2-1mlir/lib/IR/BuiltinDialectBytecode.cpp
+2-1mlir/lib/Dialect/Quant/IR/QuantDialectBytecode.cpp
+36-71 files not shown
+38-87 files

LLVM/project 82f7ab6 — clang/lib/CIR/Dialect/IR CIRDialectBytecode.cpp, mlir/include/mlir/IR BytecodeBase.td

[mlir][ODS] Fully qualify names in generated bytecode readers and writers

The code generated by `-gen-bytecode` referred to MLIR and LLVM
constructs such as `MLIRContext`, `DialectBytecodeReader`,
`LogicalResult`, `TypeSwitch` and `getChecked` without qualification,
as did the snippets in `BytecodeBase.td`. It therefore only compiled in
a source file with `using namespace mlir;`.

This PR fully qualifies all names emitted by the generator and by
`BytecodeBase.td`. Performed a minor refactor while doing so that also fixes an error message and makes the code less ad-hoc

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+75-64mlir/tools/mlir-tblgen/BytecodeDialectGen.cpp
+23-19mlir/include/mlir/IR/BytecodeBase.td
+5-5mlir/test/mlir-tblgen/bytecode-write.td
+0-5clang/lib/CIR/Dialect/IR/CIRDialectBytecode.cpp
+1-1mlir/test/mlir-tblgen/bytecode-reserved.td
+1-1mlir/test/Bytecode/bytecode_callback_full_override.mlir
+105-951 files not shown
+107-957 files

LLVM/project bd49d77 — offload/include device.h, offload/liboffload/src OffloadImpl.cpp

[Offload][Omp] Destroy programs when unregistering images (#239239)

Currently we are creating liboffload programs with `olCreateProgram` but
we never destroy them. The natural place to do this is when
unregistering an image or, at the latest, when a device is deinitalized.

Also, fix a bug in liboffload where destructors were not called if a
Program was destroyed through `olDestroyProgram` and add a test for it.

Assisted by Claude.
DeltaFile
+115-6offload/libompaccsupport/device.cpp
+95-0offload/test/offloading/unload_declare_target.c
+48-14offload/libompaccsupport/PluginManager.cpp
+33-0offload/unittests/OffloadAPI/program/olDestroyProgram.cpp
+24-1offload/include/device.h
+10-5offload/liboffload/src/OffloadImpl.cpp
+325-263 files not shown
+341-269 files

LLVM/project 3343f17 — llvm/docs AMDGPUMemoryModel.md AMDGPUUsage.md

[AMDGPU][docs] define cluster scope and multicast loads (gfx1250)

Assisted-By: AI
DeltaFile
+83-10llvm/docs/AMDGPUDMAOperations.md
+45-0llvm/docs/AMDGPUUsage.md
+1-1llvm/docs/AMDGPUMemoryModel.md
+129-113 files

LLVM/project 27ccfd5 — llvm/lib/Transforms/Instrumentation ControlHeightReduction.cpp, llvm/test/Transforms/PGOProfile chr-hoisted-select.ll

[CHR] Skip scopes with selects hoisted outside their region (#237922)

Encountered while building Clang with ThinLTO, PGO, and CSPGO. An outer
control-height-reduction scope can hoist a select used by its conditions
out of a nested scope. Processing the nested scope can then split a
block at an instruction that no longer belongs to it, or specialize the
hoisted select without the protection of the merged branch guarding the
nested scope. The invalid block split can loop indefinitely in builds
without assertions.

Reject a scope before transforming it if any of its selected
instructions has moved outside the scope. Checking every selected
instruction also prevents incorrect specialization when the cached
branch insertion point itself has not moved.

Add regressions for the invalid block split and for a function whose
return value incorrectly changes from true to false. Without the fix,
the tests reproduce the sentinel assertion and the wrong-code result
independently. All nine CHR tests pass with the fix.

    [4 lines not shown]
DeltaFile
+120-0llvm/test/Transforms/PGOProfile/chr-hoisted-select.ll
+10-0llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+130-02 files

LLVM/project 37894b5 — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp

[LoongArch][NFC] Replace manual v2i128 check with MVT::v2i128
DeltaFile
+2-7llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+2-71 files

LLVM/project 9c1ee84 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+39-0compiler-rt/test/cfi/vfe-diag.cpp
+39-01 files

LLVM/project f3f373d — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+39-0compiler-rt/test/cfi/vfe-diag.cpp
+39-01 files

LLVM/project f3c46b0 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project 79bd5c2 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project 29e1253 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project b6c32a0 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project 0d61c40 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project 33204fb — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files

LLVM/project 288dd39 — compiler-rt/test/cfi vfe-diag.cpp

Add VFE diag compiler-rt test

Created using spr 2.0.0-beta.2
DeltaFile
+42-0compiler-rt/test/cfi/vfe-diag.cpp
+42-01 files