LLVM/project 7fa2a83llvm/test/CodeGen/AMDGPU spill-scavenge-offset.ll, llvm/test/MC/AMDGPU gfx11_asm_vop3_from_vopc.s gfx11_asm_vop3c.s

erge commit '343de6856e16b58bcbd16d479fc633f54e22fadc^' into users/meinersbur/irbuilder-extract-refactor
DeltaFile
+11,062-82llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
+10,486-0llvm/test/MC/AMDGPU/gfx11_asm_vop3_from_vopc.s
+0-10,486llvm/test/MC/AMDGPU/gfx11_asm_vop3c.s
+0-6,852llvm/test/MC/AMDGPU/gfx11_asm_vop3c_dpp16.s
+6,852-0llvm/test/MC/AMDGPU/gfx11_asm_vop3_dpp16_from_vopc.s
+2,786-2,786llvm/test/MC/AMDGPU/gfx90a_ldst_acc.s
+31,186-20,2069,363 files not shown
+434,240-216,2639,369 files

LLVM/project 9048ea2mlir/test lit.cfg.py, mlir/test/Integration/Dialect/Async/CPU microbench-scf-async-parallel-for.mlir test-async-parallel-for-1d.mlir

Reland "[mlir] Make the vast majority of intgration and runner tests work on Windows"

This reverts commit 5561e174117ff395d65b6978d04b62c1a1275138

The logic was moved from cmake into lit fixing the issue that lead to the revert and potentially others with multi-config cmake generators

Differential Revision: https://reviews.llvm.org/D143925
DeltaFile
+26-1mlir/test/lit.cfg.py
+9-9mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
+9-9mlir/test/Integration/Dialect/Vector/GPU/CUDA/test-warp-distribute.mlir
+10-4mlir/test/mlir-spirv-cpu-runner/mlir_test_spirv_cpu_runner_c_wrappers.cpp
+6-6mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
+6-6mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir
+66-35243 files not shown
+400-373249 files

LLVM/project 5561e17mlir/test CMakeLists.txt, mlir/test/Integration/Dialect/Async/CPU microbench-scf-async-parallel-for.mlir test-async-parallel-for-1d.mlir

Revert "[mlir] Make the vast majority of integration and runner tests work on Windows"

This reverts commit 161b9d741a3c25f7bd79620598c5a2acf3f0f377.

REASON:

cmake --build . --target check-mlir-integration

Failed Tests (186):
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-addi-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-cmpi-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-compare-results-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-constants-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-max-min-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-muli-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-shli-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-shrsi-i16.mlir
  MLIR :: Integration/Dialect/Arith/CPU/test-wide-int-emulation-shrui-i16.mlir
  MLIR :: Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir

    [183 lines not shown]
DeltaFile
+2-32mlir/test/CMakeLists.txt
+9-9mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
+9-9mlir/test/Integration/Dialect/Vector/GPU/CUDA/test-warp-distribute.mlir
+4-10mlir/test/mlir-spirv-cpu-runner/mlir_test_spirv_cpu_runner_c_wrappers.cpp
+6-6mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
+6-6mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
+36-72244 files not shown
+374-420250 files

LLVM/project 161b9d7mlir/test CMakeLists.txt, mlir/test/Integration/Dialect/Async/CPU microbench-scf-async-parallel-for.mlir test-async-parallel-for-1d.mlir

[mlir] Make the vast majority of integration and runner tests work on Windows

This patch contains the changes required to make the vast majority of integration and runner tests run on Windows.
Historically speaking, the JIT support for Windows has been lacking behind, but recent versions of ORC JIT have now caught up and works for basically all examples in repo.

Sadly due to these tests previously not working on Windows, basically all of them are making unix-like assumptions about things like filenames, paths, shell syntax etc.
This patch fixes all these issues in one big swoop and enables Windows support for the vast majority of integration tests.

More specifically, following changes had to be done:
* The various JIT runners used paths to the runtime libraries that assumed a Unix toolchain layout and filenames. I abstracted the specific path and filename of these runtime libraries away by making the paths to the runtime libraries be passed from cmake into lit. This now also allows a much more convenient syntax: `--shared-libs=%mlir_c_runner_utils` instead of `--shared-libs=%mlir_lib_dir/lib/libmlir_c_runner_utils%shlibext`
* Some tests using python set environment variables using the `ENV=VALUE cmd` format. This works on Unix, but on Windows it has to prefixed using `env ENV=VALUE cmd`
* Some tests used C functions that are simply not available or exported on Windows (`fabsf`, `aligned_alloc`). These tests have either been adjusted or explicitly marked as `UNSUPPORTED`

Some tests remain disabled on Windows as before:
* In SparseTensor some tests have non-trivial logic for finding the runtime libraries which seems to be required for the use of emulators. I do not have the time to port these so I simply kept them disabled
* Some tests requiring special hardware which I simply cannot test remain disabled on Windows. These include usage of AVX512 or AMX

The tests for `mlir-vulkan-runner` and `mlir-spirv-runner` all work now as well and so do the vast majority of `mlir-cpu-runner`.

Differential Revision: https://reviews.llvm.org/D143925
DeltaFile
+32-2mlir/test/CMakeLists.txt
+9-9mlir/test/Integration/Dialect/Vector/GPU/CUDA/test-warp-distribute.mlir
+9-9mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
+10-4mlir/test/mlir-spirv-cpu-runner/mlir_test_spirv_cpu_runner_c_wrappers.cpp
+6-6mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
+6-6mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
+72-36244 files not shown
+420-374250 files

LLVM/project 52ca149mlir/lib/Dialect/SPIRV/IR TargetAndABI.cpp, mlir/lib/Dialect/SPIRV/Transforms LowerABIAttributesPass.cpp

[mlir][spirv] Allow controlling subgroup size

This commit extends the `ResourceLimitsAttr` to support specifying
a minimal and maximal subgroup size, and extends `EntryPointABIAttr`
to support specifying the requested subgroup size. This is possible
now in Vulkan with the VK_EXT_subgroup_size_control extension.
For OpenCL it's possible to use the `SubgroupSize` execution mode
directly.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D138962
DeltaFile
+36-9mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
+25-5mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir
+14-14mlir/test/Conversion/GPUToSPIRV/builtins.mlir
+24-2mlir/test/Dialect/SPIRV/Transforms/abi-interface-opencl.mlir
+14-11mlir/lib/Dialect/SPIRV/IR/TargetAndABI.cpp
+8-8mlir/test/Conversion/GPUToSPIRV/wmma-ops-to-spirv.mlir
+121-4923 files not shown
+184-10029 files

LLVM/project ce82530mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td SPIRVNonUniformOps.td

Revert "[mlir][spirv] Change td def/class prefix from SPV to SPIRV"

This reverts commit a2052b8794cb5abac131cd62f68505eebcfaffcb.

This commit renamed some Vulkan identifiers that shouldn't have been
renamed, e.g., `SPV_KHR_storage_buffer_storage_class`.
DeltaFile
+2,321-2,321mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+104-104mlir/include/mlir/Dialect/SPIRV/IR/SPIRVNonUniformOps.td
+70-70mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLOps.td
+64-64mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
+59-59mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
+55-55mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+2,673-2,67354 files not shown
+3,304-3,30760 files

LLVM/project a2052b8mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td SPIRVNonUniformOps.td

[mlir][spirv] Change td def/class prefix from SPV to SPIRV

Tested with `check-mlir` and `check-mlir-integration`.

Fixes: https://github.com/llvm/llvm-project/issues/56863

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D134649
DeltaFile
+2,321-2,321mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+104-104mlir/include/mlir/Dialect/SPIRV/IR/SPIRVNonUniformOps.td
+70-70mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLOps.td
+64-64mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
+59-59mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
+55-55mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+2,673-2,67354 files not shown
+3,307-3,30460 files

LLVM/project 5ab6ef7mlir/test/Conversion/ArithmeticToSPIRV arithmetic-to-spirv.mlir, mlir/test/Conversion/FuncToSPIRV types-to-spirv.mlir

[mlir][spirv] Change dialect name from 'spv' to 'spirv'

Tested with `check-mlir` and `check-mlir-integration`.

Issue: https://github.com/llvm/llvm-project/issues/56863

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D134620
DeltaFile
+514-514mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir
+382-382mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
+362-362mlir/test/Dialect/SPIRV/IR/structure-ops.mlir
+308-308mlir/test/Conversion/FuncToSPIRV/types-to-spirv.mlir
+307-307mlir/test/Conversion/MemRefToSPIRV/memref-to-spirv.mlir
+299-299mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/conflict-resolution.mlir
+2,172-2,172185 files not shown
+10,009-9,994191 files

LLVM/project 0f2ec35mlir/test lit.cfg.py, mlir/test/Integration/Dialect/SparseTensor/python test_SDDMM.py test_SpMM.py

[MLIR] Switch lit tests to %mlir_lib_dir and %mlir_src_dir replacements.

The old replacements will be removed soon:
- `%linalg_test_lib_dir`
- `%cuda_wrapper_library_dir`
- `%spirv_wrapper_library_dir`
- `%vulkan_wrapper_library_dir`
- `%mlir_runner_utils_dir`
- `%mlir_integration_test_dir`

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D133270
DeltaFile
+98-99mlir/test/Integration/Dialect/SparseTensor/python/test_SDDMM.py
+85-84mlir/test/Integration/Dialect/SparseTensor/python/test_SpMM.py
+78-18utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+45-45mlir/test/Integration/Dialect/SparseTensor/python/test_output.py
+20-19mlir/test/lit.cfg.py
+9-9mlir/test/Integration/Dialect/Vector/GPU/CUDA/test-warp-distribute.mlir
+335-274196 files not shown
+638-586202 files

LLVM/project a31ff0amlir/include/mlir/Dialect/SPIRV/IR SPIRVAttributes.td TargetAndABI.td, mlir/lib/Dialect/SPIRV/IR SPIRVAttributes.cpp SPIRVDialect.cpp

[mlir][spirv] Replace StructAttrs with AttrDefs

Depends on D127370

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D127373
DeltaFile
+333-19mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp
+3-330mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
+103-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td
+0-90mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td
+39-50mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir
+28-28mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir
+506-51743 files not shown
+709-70649 files

LLVM/project d455569mlir/include/mlir/ExecutionEngine RunnerUtils.h, mlir/lib/ExecutionEngine RunnerUtils.cpp

[mlir] Fix the names of exported functions

The names of the functions that are supposed to be exported do not match the implementations. This is due in part to https://github.com/llvm/llvm-project/commit/cac7aabbd8236bef2909bfc0dbba17644f7aaade.

This change makes the implementations and declarations match and adds a couple missing declarations.

The new names follow the pattern of the existing `verify` functions where the prefix is maintained as `_mlir_ciface_` but the suffix follows the new naming convention.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124891
DeltaFile
+26-33mlir/lib/ExecutionEngine/RunnerUtils.cpp
+23-18mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+9-9mlir/test/mlir-cpu-runner/unranked-memref.mlir
+8-8mlir/test/mlir-cpu-runner/global-memref.mlir
+8-8mlir/test/Integration/Dialect/Linalg/CPU/test-one-shot-bufferize.mlir
+7-7mlir/test/mlir-cpu-runner/async.mlir
+81-8361 files not shown
+245-24867 files

LLVM/project 63237cdmlir/test/mlir-cpu-runner math-polynomial-approx.mlir unranked-memref.mlir, mlir/test/mlir-tblgen types.mlir pattern.mlir

[mlir][NFC] Update textual references of `func` to `func.func` in tool/runner tests

The special case parsing of `func` operations is being removed.
DeltaFile
+64-64mlir/test/mlir-tblgen/types.mlir
+54-54mlir/test/mlir-tblgen/pattern.mlir
+19-19mlir/test/mlir-tblgen/attr-or-type-format.mlir
+12-12mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir
+10-10mlir/test/mlir-cpu-runner/unranked-memref.mlir
+9-9mlir/test/mlir-tblgen/trait.mlir
+168-16837 files not shown
+294-29443 files

LLVM/project 80a0c15clang/test/CodeGen/RISCV/rvv-intrinsics vloxseg.c vluxseg.c, clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded vloxseg.c vluxseg.c

Merge branch 'main' into irbuilder-extract-refactor
DeltaFile
+12,242-14,649llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
+11,615-13,961llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
+2-24,936clang/test/CodeGen/RISCV/rvv-intrinsics/vloxseg.c
+2-24,936clang/test/CodeGen/RISCV/rvv-intrinsics/vluxseg.c
+2-21,307clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vloxseg.c
+2-21,307clang/test/CodeGen/RISCV/rvv-intrinsics-overloaded/vluxseg.c
+23,865-121,09630,598 files not shown
+2,090,526-1,305,42030,604 files

LLVM/project aae5125mlir/include/mlir/Dialect/GPU GPUOps.td, mlir/include/mlir/Dialect/LLVMIR NVVMOps.td

[mlir] Replace StrEnumAttr -> EnumAttr in core dialects

Removes uses of `StrEnumAttr` in core dialects

Reviewed By: mehdi_amini, rriddle

Differential Revision: https://reviews.llvm.org/D117514
DeltaFile
+117-118mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+94-57mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+82-61mlir/include/mlir/Dialect/GPU/GPUOps.td
+41-40mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+45-31mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+20-54mlir/test/Dialect/GPU/invalid.mlir
+399-36168 files not shown
+1,024-90474 files

LLVM/project a54f4eamlir/include/mlir/Dialect/StandardOps/IR Ops.td, mlir/lib/Conversion/ArithmeticToSPIRV ArithmeticToSPIRV.cpp

[MLIR] Replace std ops with arith dialect ops

Precursor: https://reviews.llvm.org/D110200

Removed redundant ops from the standard dialect that were moved to the
`arith` or `math` dialects.

Renamed all instances of operations in the codebase and in tests.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D110797
DeltaFile
+38-1,280mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+2-1,137mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
+489-489mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
+451-432mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+834-0mlir/test/Conversion/ArithmeticToSPIRV/arithmetic-to-spirv.mlir
+826-0mlir/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
+2,640-3,338804 files not shown
+22,255-21,598810 files

LLVM/project b868a3emlir/test/mlir-spirv-cpu-runner simple_add.mlir double.mlir, mlir/test/mlir-vulkan-runner addi.mlir addi8.mlir

[mlir] fix SPIR-V CPU and Vulkan runners after e2310704d890ad252aeb1ca28b4b84d29514b1d1

The commit in question changed the syntax but did not update the runner
tests. This also required registering the MemRef dialect for custom
parser to work correctly.
DeltaFile
+18-18mlir/test/mlir-spirv-cpu-runner/simple_add.mlir
+17-17mlir/test/mlir-spirv-cpu-runner/double.mlir
+10-10mlir/test/mlir-vulkan-runner/addi.mlir
+10-10mlir/test/mlir-vulkan-runner/addi8.mlir
+10-10mlir/test/mlir-vulkan-runner/mulf.mlir
+10-10mlir/test/mlir-vulkan-runner/time.mlir
+75-756 files not shown
+103-9712 files

LLVM/project b7382edmlir/test/Conversion/StandardToLLVM convert-to-llvmir.mlir, mlir/test/Dialect/SPIRV types.mlir

[MLIR] Extend Symbol verification to reject public symbol declarations.

- Extend the Symbol interface with `isDeclaration` to identify operations that declare
  a symbol as opposed to define it.
- Extend verification to disallow public declarations as per the discussion in
   https://llvm.discourse.group/t/rfc-symbol-definition-declaration-x-visibility-checks/2140
- Adopt the new interface for `FuncOp` and fix test and code to not have/create public
  function declarations.

Differential Revision: https://reviews.llvm.org/D91456
DeltaFile
+145-145mlir/test/Dialect/SPIRV/types.mlir
+124-124mlir/test/IR/affine-map.mlir
+88-88mlir/test/IR/parser.mlir
+39-39mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
+14-14mlir/test/IR/test-func-erase-result.mlir
+13-13mlir/test/Transforms/buffer-results-to-out-params.mlir
+423-42387 files not shown
+634-60293 files

LLVM/project 9ab5362mlir/test/Conversion/GPUCommon lower-launch-func-to-gpu-runtime-calls.mlir, mlir/test/Conversion/GPUToSPIRV builtins.mlir simple.mlir

[mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D89929
DeltaFile
+16-8mlir/test/Conversion/GPUToSPIRV/builtins.mlir
+6-4mlir/test/Conversion/GPUToSPIRV/simple.mlir
+5-4mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir
+4-1mlir/test/Conversion/GPUToVulkan/lower-gpu-launch-vulkan-launch.mlir
+3-2mlir/test/mlir-vulkan-runner/addf.mlir
+3-2mlir/test/mlir-vulkan-runner/mulf.mlir
+37-218 files not shown
+62-3414 files

LLVM/project 8d420fbmlir/test/Conversion/LinalgToSPIRV linalg-to-spirv.mlir, mlir/test/Conversion/StandardToSPIRV std-types-to-spirv.mlir std-ops-to-spirv.mlir

[spirv][nfc] Simplify resource limit with default values

These deafult values are gotten from Vulkan required limits.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D87090
DeltaFile
+24-88mlir/test/Conversion/StandardToSPIRV/std-types-to-spirv.mlir
+12-38mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
+12-35mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
+8-24mlir/test/Conversion/StandardToSPIRV/alloc.mlir
+16-16mlir/test/Dialect/SPIRV/target-env.mlir
+4-20mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir
+76-22115 files not shown
+98-27621 files

LLVM/project afd43a7mlir/lib/Conversion/GPUToVulkan ConvertLaunchFuncToVulkanCalls.cpp, mlir/test/mlir-vulkan-runner addi8.mlir

[mlir][vulkan-runner] add support for memref of i8, i16 types in vulkan runner

This extends the types supported as kernel arguments when using vulkan runner.

Differential Revision: https://reviews.llvm.org/D82068
DeltaFile
+52-67mlir/tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp
+35-43mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
+52-0mlir/test/mlir-vulkan-runner/addi8.mlir
+139-1103 files