LLVM/project 2d80486llvm/lib/Target/RISCV RISCVInstrInfo.cpp

[RISCV] Use a switch in RISCVInstrInfo::verifyInstruction. NFC (#170961)

The immediate only operands handled with a range check and a switch
nested under the default case.
DeltaFile
+191-183llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+191-1831 files

LLVM/project 62355f1.github/workflows release-sources.yml

Update actions/checkout action to v6 (#171065)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | major | `v5.0.0` -> `v6.0.1` |
DeltaFile
+1-1.github/workflows/release-sources.yml
+1-11 files

LLVM/project 3562217utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Fix bazel build for 5dbd049662001535a475cdb7d290dfb63a0515fc
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project fc92e4dllvm/lib/Transforms/InstCombine InstCombinePHI.cpp

[InstCombine] Fix bail-out in `PHIsEqualValue()` (#170650)

We encountered a such case: `PHIsEqualValue()` is called with a PHI node
`PN` whose incoming values are all PHI nodes, and `NonPhiInVal` is
nullptr. When the size of `ValueEqualPHIs` reaches 16, `NonPhiInVal` is
still nullptr, then we keep scanning PHI node operands, this time the
recursion won't bail out even if we have visited too many PHI nodes.

In our case, the recursion ends with ~1700 PHI nodes visited, causes
InstCombine time-consuming.
DeltaFile
+1-1llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+1-11 files

LLVM/project 000e462utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Fix mlir build after #171024 (#171068)

DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 25c4d5dllvm/test/CodeGen/AMDGPU inline-asm-use-bool.ll inline-asm.ll

move test
DeltaFile
+0-15llvm/test/CodeGen/AMDGPU/inline-asm-use-bool.ll
+12-0llvm/test/CodeGen/AMDGPU/inline-asm.ll
+12-152 files

LLVM/project 00c592ellvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU inline-asm-use-bool.ll

[AMDGPU] Fix a crash when a bool variable is used in inline asm
DeltaFile
+15-0llvm/test/CodeGen/AMDGPU/inline-asm-use-bool.ll
+5-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+20-02 files

LLVM/project 72b4a5dlibcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons deduct.pass.cpp deduct_pmr.pass.cpp, libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons deduct.pass.cpp sorted_container.pass.cpp

[libcxx] Removal of narrowing conversions in `flat_[multi]{set, map}` tests for compatibility with MSVC (#170909)

Impacts files in `test/std/containers/container.adaptors/flat.xxx`. No
meaning is changed; only appropriate types are spelled out to prevent
compiler warnings.

- Replace `char`s and `short`s used in tests of `flat_[multi]{set, map}`
with `long`s to prevent warnings about narrowing conversions when
running tests. Allow increased test coverage for MSVC STL.
- Make test code robust against evil overloads of operator comma .(2
files)
- Add `[[maybe_unused]]` to some local `typedef`s that are sometimes
unused due to usage of `LIBCPP_STATIC_ASSERT`.

For discussion and suggested changes, see the LLVM Discord
https://discord.com/channels/636084430946959380/636732894974312448/1445901676400742533
DeltaFile
+27-27libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/deduct.pass.cpp
+27-27libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/deduct.pass.cpp
+14-14libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/sorted_container.pass.cpp
+14-14libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/deduct_pmr.pass.cpp
+14-14libcxx/test/std/containers/container.adaptors/flat.map/flat.map.cons/deduct_pmr.pass.cpp
+13-13libcxx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.cons/range.pass.cpp
+109-10928 files not shown
+277-27534 files

LLVM/project e49da4fllvm/test/TableGen RegClassByHwModeCompressPat.td RegClassByHwModeErrors.td, llvm/test/TableGen/Common RegClassByHwModeCommon.td

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1
DeltaFile
+315-0llvm/test/TableGen/RegClassByHwModeCompressPat.td
+88-0llvm/test/TableGen/RegClassByHwModeErrors.td
+7-57llvm/test/TableGen/RegClassByHwMode.td
+44-0llvm/test/TableGen/Common/RegClassByHwModeCommon.td
+18-15llvm/utils/TableGen/CompressInstEmitter.cpp
+12-9llvm/utils/TableGen/Common/CodeGenInstAlias.cpp
+484-814 files not shown
+500-8710 files

LLVM/project 1d2a664llvm/test/TableGen RegClassByHwModeErrors.td RegClassByHwMode.td, llvm/test/TableGen/Common RegClassByHwModeCommon.td

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

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+88-0llvm/test/TableGen/RegClassByHwModeErrors.td
+7-57llvm/test/TableGen/RegClassByHwMode.td
+44-0llvm/test/TableGen/Common/RegClassByHwModeCommon.td
+12-9llvm/utils/TableGen/Common/CodeGenInstAlias.cpp
+8-6llvm/utils/TableGen/CompressInstEmitter.cpp
+10-2llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+169-743 files not shown
+175-789 files

LLVM/project 51e5de8libc/src/__support/FPUtil/x86_64 FEnvImpl.h, mlir/lib/Conversion/ArithToAPFloat ArithToAPFloat.cpp

add assertion and two more test cases

Created using spr 1.3.8-beta.1
DeltaFile
+0-1,298openmp/runtime/src/include/omp_lib.h.var
+1,298-0openmp/module/omp_lib.h.var
+1,183-0openmp/module/omp_lib.F90.var
+0-1,183openmp/runtime/src/include/omp_lib.F90.var
+205-603libc/src/__support/FPUtil/x86_64/FEnvImpl.h
+353-237mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
+3,039-3,321442 files not shown
+13,836-7,282448 files

LLVM/project 8dfb67dlibc/src/__support/FPUtil/x86_64 FEnvImpl.h, mlir/lib/Conversion/ArithToAPFloat ArithToAPFloat.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+1,298-0openmp/module/omp_lib.h.var
+0-1,298openmp/runtime/src/include/omp_lib.h.var
+1,183-0openmp/module/omp_lib.F90.var
+0-1,183openmp/runtime/src/include/omp_lib.F90.var
+205-603libc/src/__support/FPUtil/x86_64/FEnvImpl.h
+353-237mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
+3,039-3,321440 files not shown
+13,790-7,278446 files

LLVM/project 090c0bbmlir CMakeLists.txt

[mlir][CMake] enable disabling MLIR_ENABLE_EXECUTION_ENGINE

Currently if you pass MLIR_ENABLE_EXECUTION_ENGINE=OFF it's overwritten.
DeltaFile
+5-2mlir/CMakeLists.txt
+5-21 files

LLVM/project 925601fmlir/include/mlir/Dialect/LLVMIR/Transforms Passes.h, mlir/lib/Dialect/Tensor/IR TensorOps.cpp

step
DeltaFile
+4-4mlir/lib/Rewrite/FrozenRewritePatternSet.cpp
+2-2mlir/lib/Rewrite/ByteCode.cpp
+4-0mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+2-0mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.h
+12-64 files

LLVM/project 8378a6fmlir/test/Integration/Dialect/Arith/CPU test-apfloat-emulation-vector.mlir

[mlir][arith] Fix build after #171024 (#171057)

Fix build after #171024.
DeltaFile
+2-2mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+2-21 files

LLVM/project 2c88ee5mlir/test/Integration/Dialect/Arith/CPU test-apfloat-emulation-vector.mlir

[mlir][arith] Fix build after #171024
DeltaFile
+2-2mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+2-21 files

LLVM/project 99851dfmlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedLLVMIRTransforms: Remove NVVMDialect dependency

Add conditional compilation guards to LLVMIRTransforms to allow building
without the NVVMDialect dependency.

- Add #ifndef MLIR_LLVMIR_TRANSFORMS_NO_NVVM guards around NVVM include
- Guard NVVM::registerInlinerInterface() function
- Add TrimmedLLVMIRTransforms bazel target with local_defines
- Excludes OptimizeForNVVM.cpp and OptimizeForNVVM.h
- Removes NVVMDialect dependency

Dependency paths removed:
aster-tools → ASTERInit → LLVMIRTransforms → NVVMDialect
aster-tools → ASTERInit → LLVMIRTransforms → NVVMDialect → ToLLVMIRTranslation → OpenMPDialect
DeltaFile
+45-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+4-0mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+49-02 files

LLVM/project fc85c77mlir/lib/Rewrite ByteCode.cpp, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedRewrite and TrimmedCAPIIR: Remove PDL dependencies

Add conditional compilation guards to Rewrite and create trimmed CAPI
targets to allow building without PDL dependencies.

- Wrap ByteCode.cpp in #if MLIR_ENABLE_PDL_IN_PATTERNMATCH guard
- Add TrimmedRewrite bazel target with MLIR_ENABLE_PDL_IN_PATTERNMATCH=0
  Removes deps: PDLDialect, PDLInterpDialect, PDLToPDLInterp
- Add TrimmedCAPIIR bazel target that:
  - Excludes lib/CAPI/Dialect/IRDL.cpp
  - Uses TrimmedRewrite instead of Rewrite
  - Removes IRDLDialect dependency

Dependency paths removed:
aster-tools → ASTERInit → CAPIIR → Rewrite → PDLDialect/PDLInterpDialect
aster-tools → ASTERInit → CAPIIR → IRDLDialect
DeltaFile
+84-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+5-0mlir/lib/Rewrite/ByteCode.cpp
+89-02 files

LLVM/project 2daf644mlir/lib/Dialect/Tensor/IR TensorDialect.cpp, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedTensorDialect: Remove TransformDialectInterfaces dependency

Add conditional compilation guards to TensorDialect to allow building
without the TransformDialectInterfaces dependency.

- Add #ifndef MLIR_TENSOR_NO_TRANSFORM_INTERFACES guards around Transform include
- Guard declarePromisedInterfaces<transform::FindPayloadReplacementOpInterface, ...>()
- Add TrimmedTensorDialect bazel target with local_defines

Dependency path removed:
aster-tools → AMDGCNTransforms → SCFDialect → TensorDialect → TransformDialectInterfaces
DeltaFile
+47-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+4-0mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
+51-02 files

LLVM/project a288fb3utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedFuncExtensions: Remove ShardDialect dependency

Create a trimmed FuncExtensions target that excludes ShardingInterface
dependency by excluding ShardingExtensions.cpp and AllExtensions.cpp.

- Add TrimmedFuncExtensions bazel target that excludes sharding files

Dependency path removed:
aster-tools → ASTERInit → FuncExtensions → ShardingInterface → ShardDialect
DeltaFile
+27-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+27-01 files

LLVM/project 3e906a4mlir/lib/Tools/mlir-opt MlirOptMain.cpp, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedMlirOptLib: Remove IRDLDialect dependency

Add conditional compilation guards to MlirOptLib to allow building
without the IRDLDialect dependency.

- Add #ifndef MLIR_MLIROPTLIB_NO_IRDL guards around IRDL includes
- Guard --irdl-file command line option
- Guard loadIRDLDialects() function
- Guard calls to loadIRDLDialects() in doVerifyRoundTrip and processBuffer
- Add TrimmedMlirOptLib bazel target with local_defines

Dependency path removed:
aster-tools → aster-opt → MlirOptLib → IRDLDialect
DeltaFile
+23-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+10-0mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
+33-02 files

LLVM/project b41bee0mlir/lib/Dialect/Arith/Utils Utils.cpp, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

TrimmedArithUtils: Remove ComplexDialect dependency

Add conditional compilation guards to ArithUtils to allow building
without the ComplexDialect dependency.

- Add #ifndef MLIR_ARITH_UTILS_NO_COMPLEX guards around Complex include
- Guard convertScalarToComplexDtype() function
- Guard ComplexType branch in convertScalarToDtype()
- Add TrimmedArithUtils bazel target with local_defines

Dependency path removed:
aster-tools → AMDGCNTransforms → SCFDialect → ArithUtils → ComplexDialect
DeltaFile
+18-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+8-1mlir/lib/Dialect/Arith/Utils/Utils.cpp
+26-12 files

LLVM/project 359cac4clang-tools-extra/clang-tidy/fuchsia MultipleInheritanceCheck.cpp MultipleInheritanceCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Don't cache classes by name in `fuchsia-multiple-inheritance` (#171016)

Context: for every class, this check needs to compute whether that class
is an interface (i.e. only has pure virtual methods). This is expensive,
so the check caches the computation. But it caches by class name, which
is problematic, because the same name can refer to different classes at
different scopes. Here's for example a false negative it causes:
https://godbolt.org/z/bMGc5sYqh. This PR changes it to cache by
`CXXRecordDecl *` instead.
DeltaFile
+15-0clang-tools-extra/test/clang-tidy/checkers/fuchsia/multiple-inheritance.cpp
+3-10clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.cpp
+6-0clang-tools-extra/docs/ReleaseNotes.rst
+1-1clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.h
+25-114 files

LLVM/project ffc5581llvm/lib/Target/SPIRV SPIRVPrepareFunctions.cpp SPIRVCallLowering.cpp, llvm/test/CodeGen/SPIRV/pointers fun-with-aggregate-arg-in-const-init.ll

[SPIRV] Add support for pointers to functions with aggregate args/returns as global variables / constant initialisers (#169595)

This patch does two things:

1. it extends the aggregate arg / ret replacement transform to work on
indirect calls / pointers to function. It is somewhat spread out as
retrieving the original function type is needed in a few places. In
general, we should rethink / rework the entire infrastructure around
aggregate arg/ret handling, using an opaque target specific type rather
than i32;
2. it enables global variables of pointer to function type, and, more
specifically, global variables of a aggregate type (arrays / structures)
with pointer to function elements.

This also exposes some issues in how we handle pointers to function and
lowering indirect function calls, primarily around not using the program
address space. These will be handled in a subsequent patch as they'll
require somewhat more intrusive surgery, possibly involving modifying
the data layout.
DeltaFile
+98-14llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
+107-0llvm/test/CodeGen/SPIRV/pointers/fun-with-aggregate-arg-in-const-init.ll
+28-56llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+63-0llvm/lib/Target/SPIRV/SPIRVUtils.cpp
+24-6llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+6-3llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+326-792 files not shown
+333-798 files

LLVM/project 5dbd049mlir/include/mlir/Conversion Passes.td, mlir/lib/Conversion/ArithToAPFloat ArithToAPFloat.cpp CMakeLists.txt

[mlir][arith] `arith-to-apfloat`: Add vector support (#171024)

Add support for vectorized operations such as `arith.addf ... :
vector<4xf4E2M1FN>`. The computation is scalarized: scalar operands are
extracted with `vector.to_elements`, multiple scalar computations are
performed and the result is inserted back into a vector with
`vector.from_elements`.
DeltaFile
+349-251mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
+39-0mlir/test/Conversion/ArithToApfloat/arith-to-apfloat.mlir
+26-0mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+2-1mlir/include/mlir/Conversion/Passes.td
+1-0mlir/lib/Conversion/ArithToAPFloat/CMakeLists.txt
+417-2525 files

LLVM/project c369b96mlir/include/mlir/Conversion Passes.td, mlir/lib/Conversion/ArithToAPFloat ArithToAPFloat.cpp CMakeLists.txt

[mlir][arith] `arith-to-apfloat`: Add vector support
DeltaFile
+349-251mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
+39-0mlir/test/Conversion/ArithToApfloat/arith-to-apfloat.mlir
+26-0mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+2-1mlir/include/mlir/Conversion/Passes.td
+1-0mlir/lib/Conversion/ArithToAPFloat/CMakeLists.txt
+417-2525 files

LLVM/project b176593llvm/lib/Target/AArch64 AArch64CollectCPSpillInfo.cpp AArch64TargetMachine.cpp, llvm/test/CodeGen/AArch64 fptosi-sat-vector.ll fptoui-sat-vector.ll

Constant pool spilling
DeltaFile
+503-525llvm/test/CodeGen/AArch64/fptosi-sat-vector.ll
+912-0llvm/lib/Target/AArch64/AArch64CollectCPSpillInfo.cpp
+177-177llvm/test/CodeGen/AArch64/fptoui-sat-vector.ll
+19-44llvm/test/CodeGen/AArch64/arm64-fp128.ll
+11-0llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-7llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-stores.ll
+1,624-7534 files not shown
+1,634-75510 files

LLVM/project 7bfdaa5llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

[VPlan] Fix unused variable warning

llvm-project/llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp:312:19: warning: unused variable 'EB' [-Wunused-variable]
  312 |     VPBasicBlock *EB = Plan.getExitBlocks().front();
      |                   ^~

This showed up in a non-assertions build.
DeltaFile
+2-2llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+2-21 files

LLVM/project 5bd5595llvm/lib/Target/AArch64 AArch64CollectCPSpillInfo.cpp AArch64TargetMachine.cpp, llvm/test/CodeGen/AArch64 fptosi-sat-vector.ll fptoui-sat-vector.ll

Constant pool spilling
DeltaFile
+503-525llvm/test/CodeGen/AArch64/fptosi-sat-vector.ll
+855-0llvm/lib/Target/AArch64/AArch64CollectCPSpillInfo.cpp
+177-177llvm/test/CodeGen/AArch64/fptoui-sat-vector.ll
+19-44llvm/test/CodeGen/AArch64/arm64-fp128.ll
+11-0llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+2-7llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-stores.ll
+1,567-7534 files not shown
+1,577-75510 files

LLVM/project 68fea00clang/lib/CodeGen/Targets SPIR.cpp, clang/test/CodeGenCUDA amdgpu-kernel-arg-pointer-type.cu kernel-args.cu

[SPIRV] Use AMDGPU ABI for AMDGCN flavoured SPIRV (#169865)

At the moment AMDGCN flavoured SPIRV uses the SPIRV ABI with some tweaks
revolving around passing aggregates as direct. This is problematic in
multiple ways:

- it leads to divergence from code compiled for a concrete target, which
makes it difficult to debug;
- it incurs a run time cost, when dealing with larger aggregates;
- it incurs a compile time cost, when dealing with larger aggregates.

This patch switches over AMDGCN flavoured SPIRV to implement the AMDGPU
ABI (except for dealing with variadic functions, which will be added in
the future). One additional complication (and the primary motivation
behind the current less than ideal state of affairs) stems from `byref`,
which AMDGPU uses, not being expressible in SPIR-V. We deal with this by
CodeGen-ing for `byref`, lowering it to the `FuncParamAttr ByVal` in
SPIR-V, and restoring it when doing reverse translation from AMDGCN
flavoured SPIR-V.
DeltaFile
+321-0clang/test/CodeGenHIP/amdgcnspirv-uses-amdgpu-abi.cpp
+254-54clang/lib/CodeGen/Targets/SPIR.cpp
+71-73clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu
+24-0llvm/test/CodeGen/SPIRV/pointers/ptr-argument-byref-amdgcnspirv.ll
+9-1llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+4-4clang/test/CodeGenCUDA/kernel-args.cu
+683-1326 files