From 5a7b9194095b37f2274bd021753c3cd15e18eafa Mon Sep 17 00:00:00 2001 From: River Riddle Date: Tue, 1 Mar 2022 14:53:41 -0800 Subject: [PATCH] [mlir][NFC] Rename StandardToLLVM to FuncToLLVM The current StandardToLLVM conversion patterns only really handle the Func dialect. The pass itself adds patterns for Arithmetic/CFToLLVM, but those should be/will be split out in a followup. This commit focuses solely on being an NFC rename. Aside from the directory change, the pattern and pass creation API have been renamed: * populateStdToLLVMFuncOpConversionPattern -> populateFuncToLLVMFuncOpConversionPattern * populateStdToLLVMConversionPatterns -> populateFuncToLLVMConversionPatterns * createLowerToLLVMPass -> createConvertFuncToLLVMPass Differential Revision: https://reviews.llvm.org/D120778 --- flang/lib/Optimizer/CodeGen/CodeGen.cpp | 4 +- flang/tools/fir-opt/CMakeLists.txt | 3 +- flang/tools/tco/CMakeLists.txt | 3 +- mlir/docs/Dialects/Linalg/_index.md | 2 +- mlir/docs/PassManagement.md | 10 +- mlir/docs/Tutorials/Toy/Ch-6.md | 2 +- mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp | 6 +- mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp | 6 +- .../ConvertFuncToLLVM.h} | 24 +++-- .../FuncToLLVM/ConvertFuncToLLVMPass.h | 28 ++++++ mlir/include/mlir/Conversion/Passes.h | 2 +- mlir/include/mlir/Conversion/Passes.td | 99 +++++++++---------- .../Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h | 4 +- .../ConvertStandardToLLVMPass.h | 31 ------ .../Conversion/AsyncToLLVM/AsyncToLLVM.cpp | 2 +- .../lib/Conversion/AsyncToLLVM/CMakeLists.txt | 2 +- mlir/lib/Conversion/CMakeLists.txt | 2 +- .../CMakeLists.txt | 9 +- .../FuncToLLVM.cpp} | 45 +++++---- mlir/lib/Conversion/GPUCommon/CMakeLists.txt | 2 +- .../GPUCommon/GPUToLLVMConversion.cpp | 6 +- mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt | 2 +- .../GPUToNVVM/LowerGpuOpsToNVVMOps.cpp | 4 +- mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt | 2 +- .../GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 4 +- .../Conversion/OpenMPToLLVM/CMakeLists.txt | 2 +- .../Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp | 6 +- .../lib/Conversion/SPIRVToLLVM/CMakeLists.txt | 8 +- .../ConvertLaunchFuncToLLVMCalls.cpp | 7 +- .../Conversion/VectorToROCDL/CMakeLists.txt | 2 +- .../VectorToROCDL/VectorToROCDL.cpp | 4 +- .../Dialect/Linalg/Transforms/CMakeLists.txt | 2 +- .../Pipelines/SparseTensorPipelines.cpp | 2 +- mlir/lib/ExecutionEngine/CMakeLists.txt | 2 +- mlir/test/CAPI/execution_engine.c | 2 +- .../ComplexToLLVM/full-conversion.mlir | 2 +- .../ComplexToStandard/full-conversion.mlir | 2 +- .../calling-convention.mlir | 4 +- .../convert-argattrs.mlir | 2 +- .../FuncToLLVM/convert-data-layout.mlir | 6 ++ .../convert-funcs.mlir | 2 +- .../convert-types.mlir | 0 .../func-memref-return.mlir | 4 +- .../func-memref.mlir | 4 +- .../func-to-llvm.mlir} | 4 +- .../invalid.mlir | 2 +- .../StandardToLLVM/convert-data-layout.mlir | 6 -- .../Dialect/ArmSVE/legalize-for-llvm.mlir | 2 +- .../microbench-linalg-async-parallel-for.mlir | 4 +- .../microbench-scf-async-parallel-for.mlir | 6 +- .../Async/CPU/test-async-parallel-for-1d.mlir | 6 +- .../Async/CPU/test-async-parallel-for-2d.mlir | 6 +- .../Dialect/Linalg/CPU/benchmark_matmul.mlir | 2 +- .../Dialect/Linalg/CPU/matmul-vs-matvec.mlir | 2 +- .../Linalg/CPU/rank-reducing-subview.mlir | 2 +- .../Linalg/CPU/test-collapse-tensor.mlir | 2 +- .../CPU/test-comprehensive-bufferize.mlir | 2 +- .../Dialect/Linalg/CPU/test-conv-1d-call.mlir | 4 +- .../Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir | 4 +- .../Dialect/Linalg/CPU/test-conv-2d-call.mlir | 4 +- .../CPU/test-conv-2d-nhwc-hwcf-call.mlir | 4 +- .../Dialect/Linalg/CPU/test-conv-3d-call.mlir | 4 +- .../CPU/test-conv-3d-ndhwc-dhwcf-call.mlir | 4 +- .../Dialect/Linalg/CPU/test-elementwise.mlir | 2 +- .../Linalg/CPU/test-expand-tensor.mlir | 2 +- .../Dialect/Linalg/CPU/test-padtensor.mlir | 2 +- .../test-subtensor-insert-multiple-uses.mlir | 2 +- .../Linalg/CPU/test-subtensor-insert.mlir | 2 +- .../Dialect/Linalg/CPU/test-tensor-e2e.mlir | 2 +- .../Linalg/CPU/test-tensor-matmul.mlir | 4 +- .../Integration/Dialect/Memref/memref_abi.c | 2 +- .../Standard/CPU/test-ceil-floor-pos-neg.mlir | 2 +- .../Dialect/Standard/CPU/test_subview.mlir | 2 +- .../Vector/CPU/AMX/test-mulf-full.mlir | 2 +- .../Dialect/Vector/CPU/AMX/test-mulf.mlir | 2 +- .../Dialect/Vector/CPU/AMX/test-muli-ext.mlir | 2 +- .../Vector/CPU/AMX/test-muli-full.mlir | 2 +- .../Dialect/Vector/CPU/AMX/test-muli.mlir | 2 +- .../Vector/CPU/AMX/test-tilezero-block.mlir | 2 +- .../Dialect/Vector/CPU/AMX/test-tilezero.mlir | 2 +- .../Vector/CPU/X86Vector/test-dot.mlir | 2 +- .../test-inline-asm-vector-avx512.mlir | 2 +- .../CPU/X86Vector/test-mask-compress.mlir | 2 +- .../Vector/CPU/X86Vector/test-rsqrt.mlir | 2 +- .../X86Vector/test-sparse-dot-product.mlir | 2 +- .../CPU/X86Vector/test-vp2intersect-i32.mlir | 2 +- .../Dialect/Vector/CPU/test-0-d-vectors.mlir | 2 +- .../Dialect/Vector/CPU/test-broadcast.mlir | 2 +- .../Dialect/Vector/CPU/test-compress.mlir | 2 +- .../Vector/CPU/test-constant-mask.mlir | 2 +- .../Dialect/Vector/CPU/test-contraction.mlir | 2 +- .../Vector/CPU/test-create-mask-v4i1.mlir | 2 +- .../Dialect/Vector/CPU/test-create-mask.mlir | 2 +- .../Dialect/Vector/CPU/test-expand.mlir | 2 +- .../CPU/test-extract-strided-slice.mlir | 2 +- .../Vector/CPU/test-flat-transpose-col.mlir | 2 +- .../Vector/CPU/test-flat-transpose-row.mlir | 2 +- .../Dialect/Vector/CPU/test-fma.mlir | 2 +- .../Dialect/Vector/CPU/test-gather.mlir | 2 +- .../Vector/CPU/test-index-vectors.mlir | 2 +- .../Vector/CPU/test-insert-strided-slice.mlir | 2 +- .../Dialect/Vector/CPU/test-maskedload.mlir | 2 +- .../Dialect/Vector/CPU/test-maskedstore.mlir | 2 +- .../Vector/CPU/test-matrix-multiply-col.mlir | 2 +- .../Vector/CPU/test-matrix-multiply-row.mlir | 2 +- .../Vector/CPU/test-outerproduct-f32.mlir | 2 +- .../Vector/CPU/test-outerproduct-i64.mlir | 2 +- .../Dialect/Vector/CPU/test-print-int.mlir | 2 +- .../CPU/test-reductions-f32-reassoc.mlir | 2 +- .../Vector/CPU/test-reductions-f32.mlir | 2 +- .../CPU/test-reductions-f64-reassoc.mlir | 2 +- .../Vector/CPU/test-reductions-f64.mlir | 2 +- .../Vector/CPU/test-reductions-i32.mlir | 2 +- .../Vector/CPU/test-reductions-i4.mlir | 2 +- .../Vector/CPU/test-reductions-i64.mlir | 2 +- .../Vector/CPU/test-reductions-si4.mlir | 2 +- .../Vector/CPU/test-reductions-ui4.mlir | 2 +- .../Dialect/Vector/CPU/test-scan.mlir | 2 +- .../Dialect/Vector/CPU/test-scatter.mlir | 2 +- .../Dialect/Vector/CPU/test-shape-cast.mlir | 2 +- .../Dialect/Vector/CPU/test-shuffle.mlir | 2 +- .../Vector/CPU/test-sparse-dot-matvec.mlir | 2 +- .../CPU/test-sparse-saxpy-jagged-matvec.mlir | 2 +- .../Vector/CPU/test-transfer-read-1d.mlir | 8 +- .../Vector/CPU/test-transfer-read-2d.mlir | 8 +- .../Vector/CPU/test-transfer-read-3d.mlir | 8 +- .../Vector/CPU/test-transfer-read.mlir | 4 +- .../Vector/CPU/test-transfer-to-loops.mlir | 4 +- .../Vector/CPU/test-transfer-write.mlir | 2 +- .../Dialect/Vector/CPU/test-transpose.mlir | 2 +- .../Vector/CPU/test-vector-distribute.mlir | 4 +- mlir/test/Integration/GPU/CUDA/async.mlir | 2 +- .../test/Target/LLVMIR/vector-to-llvm-ir.mlir | 2 +- mlir/test/lib/Conversion/CMakeLists.txt | 2 +- .../CMakeLists.txt | 6 +- .../TestConvertCallOp.cpp | 6 +- .../math-polynomial-approx-avx2.mlir | 2 +- mlir/test/mlir-cpu-runner/async-error.mlir | 2 +- mlir/test/mlir-cpu-runner/async-group.mlir | 2 +- mlir/test/mlir-cpu-runner/async-value.mlir | 2 +- mlir/test/mlir-cpu-runner/async.mlir | 2 +- .../mlir-cpu-runner/bare-ptr-call-conv.mlir | 2 +- mlir/test/mlir-cpu-runner/copy.mlir | 2 +- mlir/test/mlir-cpu-runner/global-memref.mlir | 2 +- .../math-polynomial-approx.mlir | 2 +- .../memref-reinterpret-cast.mlir | 2 +- mlir/test/mlir-cpu-runner/memref-reshape.mlir | 2 +- .../mlir-cpu-runner/sgemm-naive-codegen.mlir | 2 +- .../test/mlir-cpu-runner/unranked-memref.mlir | 2 +- mlir/test/mlir-cpu-runner/utils.mlir | 8 +- mlir/test/mlir-opt/async.mlir | 2 +- mlir/test/python/execution_engine.py | 2 +- .../integration/dialects/linalg/opsrun.py | 2 +- mlir/tools/mlir-opt/CMakeLists.txt | 2 +- .../mlir-spirv-cpu-runner.cpp | 2 +- .../mlir-vulkan-runner/mlir-vulkan-runner.cpp | 4 +- mlir/unittests/ExecutionEngine/Invoke.cpp | 4 +- 157 files changed, 330 insertions(+), 339 deletions(-) rename mlir/include/mlir/Conversion/{StandardToLLVM/ConvertStandardToLLVM.h => FuncToLLVM/ConvertFuncToLLVM.h} (52%) create mode 100644 mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h delete mode 100644 mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h rename mlir/lib/Conversion/{StandardToLLVM => FuncToLLVM}/CMakeLists.txt (63%) rename mlir/lib/Conversion/{StandardToLLVM/StandardToLLVM.cpp => FuncToLLVM/FuncToLLVM.cpp} (94%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/calling-convention.mlir (98%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/convert-argattrs.mlir (93%) create mode 100644 mlir/test/Conversion/FuncToLLVM/convert-data-layout.mlir rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/convert-funcs.mlir (96%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/convert-types.mlir (100%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/func-memref-return.mlir (96%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/func-memref.mlir (93%) rename mlir/test/Conversion/{StandardToLLVM/standard-to-llvm.mlir => FuncToLLVM/func-to-llvm.mlir} (98%) rename mlir/test/Conversion/{StandardToLLVM => FuncToLLVM}/invalid.mlir (73%) delete mode 100644 mlir/test/Conversion/StandardToLLVM/convert-data-layout.mlir rename mlir/test/lib/Conversion/{StandardToLLVM => FuncToLLVM}/CMakeLists.txt (73%) rename mlir/test/lib/Conversion/{StandardToLLVM => FuncToLLVM}/TestConvertCallOp.cpp (92%) diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp index 150e078c1233..eca309aab446 100644 --- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp @@ -21,8 +21,8 @@ #include "flang/Semantics/runtime-type-info.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/IR/BuiltinTypes.h" #include "mlir/IR/Matchers.h" #include "mlir/Pass/Pass.h" @@ -3306,7 +3306,7 @@ public: UndefOpConversion, UnreachableOpConversion, XArrayCoorOpConversion, XEmboxOpConversion, XReboxOpConversion, ZeroOpConversion>(typeConverter, options); - mlir::populateStdToLLVMConversionPatterns(typeConverter, pattern); + mlir::populateFuncToLLVMConversionPatterns(typeConverter, pattern); mlir::arith::populateArithmeticToLLVMConversionPatterns(typeConverter, pattern); mlir::cf::populateControlFlowToLLVMConversionPatterns(typeConverter, diff --git a/flang/tools/fir-opt/CMakeLists.txt b/flang/tools/fir-opt/CMakeLists.txt index b0d1099c80ad..30ac475e63dc 100644 --- a/flang/tools/fir-opt/CMakeLists.txt +++ b/flang/tools/fir-opt/CMakeLists.txt @@ -14,13 +14,12 @@ target_link_libraries(fir-opt PRIVATE MLIRIR MLIRLLVMIR MLIRPass - MLIRStandardToLLVM + MLIRFuncToLLVM MLIRTransforms MLIRAffineToStandard MLIRAnalysis MLIRSCFToControlFlow MLIRParser - MLIRStandardToLLVM MLIRSupport MLIRVectorToLLVM MLIROptLib diff --git a/flang/tools/tco/CMakeLists.txt b/flang/tools/tco/CMakeLists.txt index ead3062dcfbb..c2526b373753 100644 --- a/flang/tools/tco/CMakeLists.txt +++ b/flang/tools/tco/CMakeLists.txt @@ -13,13 +13,12 @@ target_link_libraries(tco PRIVATE MLIRLLVMToLLVMIRTranslation MLIRTargetLLVMIRExport MLIRPass - MLIRStandardToLLVM + MLIRFuncToLLVM MLIRTransforms MLIRAffineToStandard MLIRAnalysis MLIRSCFToControlFlow MLIRParser - MLIRStandardToLLVM MLIRSupport MLIRVectorToLLVM ) diff --git a/mlir/docs/Dialects/Linalg/_index.md b/mlir/docs/Dialects/Linalg/_index.md index 4e19e2294902..5b44a7bb4cf7 100644 --- a/mlir/docs/Dialects/Linalg/_index.md +++ b/mlir/docs/Dialects/Linalg/_index.md @@ -415,7 +415,7 @@ func @pointwise_add(memref, memref, memref, ...) { ... diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md index 577cd81f40a1..db9c383e1a5b 100644 --- a/mlir/docs/PassManagement.md +++ b/mlir/docs/PassManagement.md @@ -670,13 +670,13 @@ options ::= '{' (key ('=' value)?)+ '}' For example, the following pipeline: ```shell -$ mlir-opt foo.mlir -cse -canonicalize -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' +$ mlir-opt foo.mlir -cse -canonicalize -convert-func-to-llvm='use-bare-ptr-memref-call-conv=1' ``` Can also be specified as (via the `-pass-pipeline` flag): ```shell -$ mlir-opt foo.mlir -pass-pipeline='builtin.func(cse,canonicalize),convert-std-to-llvm{use-bare-ptr-memref-call-conv=1}' +$ mlir-opt foo.mlir -pass-pipeline='builtin.func(cse,canonicalize),convert-func-to-llvm{use-bare-ptr-memref-call-conv=1}' ``` In order to support round-tripping a pass to the textual representation using @@ -997,7 +997,7 @@ pipeline. This display mode is available in mlir-opt via `-mlir-timing-display=list`. ```shell -$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='builtin.func(cse,canonicalize)' -convert-std-to-llvm -mlir-timing -mlir-timing-display=list +$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='builtin.func(cse,canonicalize)' -convert-func-to-llvm -mlir-timing -mlir-timing-display=list ===-------------------------------------------------------------------------=== ... Pass execution timing report ... @@ -1022,7 +1022,7 @@ the most time, and can also be used to identify when analyses are being invalidated and recomputed. This is the default display mode. ```shell -$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='builtin.func(cse,canonicalize)' -convert-std-to-llvm -mlir-timing +$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='builtin.func(cse,canonicalize)' -convert-func-to-llvm -mlir-timing ===-------------------------------------------------------------------------=== ... Pass execution timing report ... @@ -1053,7 +1053,7 @@ perceived time, or clock time, whereas the `User Time` will display the total cpu time. ```shell -$ mlir-opt foo.mlir -pass-pipeline='builtin.func(cse,canonicalize)' -convert-std-to-llvm -mlir-timing +$ mlir-opt foo.mlir -pass-pipeline='builtin.func(cse,canonicalize)' -convert-func-to-llvm -mlir-timing ===-------------------------------------------------------------------------=== ... Pass execution timing report ... diff --git a/mlir/docs/Tutorials/Toy/Ch-6.md b/mlir/docs/Tutorials/Toy/Ch-6.md index 06c0681f2294..35abe1d0e6ba 100644 --- a/mlir/docs/Tutorials/Toy/Ch-6.md +++ b/mlir/docs/Tutorials/Toy/Ch-6.md @@ -97,7 +97,7 @@ multiple stages by relying on mlir::cf::populateSCFToControlFlowConversionPatterns(patterns, &getContext()); mlir::arith::populateArithmeticToLLVMConversionPatterns(typeConverter, patterns); - mlir::populateStdToLLVMConversionPatterns(typeConverter, patterns); + mlir::populateFuncToLLVMConversionPatterns(typeConverter, patterns); mlir::cf::populateControlFlowToLLVMConversionPatterns(patterns, &getContext()); // The only remaining operation, to lower from the `toy` dialect, is the diff --git a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp index 44265e6cbd2a..5318b53cc09d 100644 --- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp @@ -28,12 +28,12 @@ #include "mlir/Conversion/AffineToStandard/AffineToStandard.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/Func/IR/FuncOps.h" @@ -208,7 +208,7 @@ void ToyToLLVMLoweringPass::runOnOperation() { patterns); populateMemRefToLLVMConversionPatterns(typeConverter, patterns); cf::populateControlFlowToLLVMConversionPatterns(typeConverter, patterns); - populateStdToLLVMConversionPatterns(typeConverter, patterns); + populateFuncToLLVMConversionPatterns(typeConverter, patterns); // The only remaining operation to lower from the `toy` dialect, is the // PrintOp. diff --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp index 44265e6cbd2a..5318b53cc09d 100644 --- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp +++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp @@ -28,12 +28,12 @@ #include "mlir/Conversion/AffineToStandard/AffineToStandard.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/Func/IR/FuncOps.h" @@ -208,7 +208,7 @@ void ToyToLLVMLoweringPass::runOnOperation() { patterns); populateMemRefToLLVMConversionPatterns(typeConverter, patterns); cf::populateControlFlowToLLVMConversionPatterns(typeConverter, patterns); - populateStdToLLVMConversionPatterns(typeConverter, patterns); + populateFuncToLLVMConversionPatterns(typeConverter, patterns); // The only remaining operation to lower from the `toy` dialect, is the // PrintOp. diff --git a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h b/mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h similarity index 52% rename from mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h rename to mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h index 7a72e794a195..6d08fc3d4a17 100644 --- a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h +++ b/mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h @@ -1,4 +1,4 @@ -//===- ConvertStandardToLLVM.h - Convert to the LLVM dialect ----*- C++ -*-===// +//===- ConvertFuncToLLVM.h - Convert Func to LLVM ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,18 +6,16 @@ // //===----------------------------------------------------------------------===// // -// Provides a dialect conversion targeting the LLVM IR dialect. By default, it -// converts Standard ops and types and provides hooks for dialect-specific -// extensions to the conversion. +// Provides a set of conversion patterns from the Func dialect to the LLVM IR +// dialect. // //===----------------------------------------------------------------------===// -#ifndef MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVM_H -#define MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVM_H +#ifndef MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVM_H +#define MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVM_H namespace mlir { -class MLIRContext; class LLVMTypeConverter; class RewritePatternSet; @@ -25,16 +23,16 @@ class RewritePatternSet; /// `emitCWrappers` is set, the pattern will also produce functions /// that pass memref descriptors by pointer-to-structure in addition to the /// default unpacked form. -void populateStdToLLVMFuncOpConversionPattern(LLVMTypeConverter &converter, - RewritePatternSet &patterns); +void populateFuncToLLVMFuncOpConversionPattern(LLVMTypeConverter &converter, + RewritePatternSet &patterns); -/// Collect the patterns to convert from the Standard dialect to LLVM. The +/// Collect the patterns to convert from the Func dialect to LLVM. The /// conversion patterns capture the LLVMTypeConverter and the LowerToLLVMOptions /// by reference meaning the references have to remain alive during the entire /// pattern lifetime. -void populateStdToLLVMConversionPatterns(LLVMTypeConverter &converter, - RewritePatternSet &patterns); +void populateFuncToLLVMConversionPatterns(LLVMTypeConverter &converter, + RewritePatternSet &patterns); } // namespace mlir -#endif // MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVM_H +#endif // MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVM_H diff --git a/mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h b/mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h new file mode 100644 index 000000000000..399ca897f29b --- /dev/null +++ b/mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h @@ -0,0 +1,28 @@ +//===- ConvertFuncToLLVMPass.h - Pass entrypoint ----------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVMPASS_H_ +#define MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVMPASS_H_ + +#include + +namespace mlir { +class LowerToLLVMOptions; +class ModuleOp; +template +class OperationPass; +class Pass; + +/// Creates a pass to convert the Func dialect into the LLVMIR dialect. +std::unique_ptr> createConvertFuncToLLVMPass(); +std::unique_ptr> +createConvertFuncToLLVMPass(const LowerToLLVMOptions &options); + +} // namespace mlir + +#endif // MLIR_CONVERSION_FUNCTOLLVM_CONVERTFUNCTOLLVMPASS_H_ diff --git a/mlir/include/mlir/Conversion/Passes.h b/mlir/include/mlir/Conversion/Passes.h index 39a6411701a5..d10422073751 100644 --- a/mlir/include/mlir/Conversion/Passes.h +++ b/mlir/include/mlir/Conversion/Passes.h @@ -20,6 +20,7 @@ #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" #include "mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.h" #include "mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRVPass.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/FuncToSPIRV/FuncToSPIRVPass.h" #include "mlir/Conversion/GPUCommon/GPUCommonPass.h" #include "mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h" @@ -45,7 +46,6 @@ #include "mlir/Conversion/SCFToSPIRV/SCFToSPIRVPass.h" #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h" #include "mlir/Conversion/ShapeToStandard/ShapeToStandard.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Conversion/TensorToSPIRV/TensorToSPIRVPass.h" #include "mlir/Conversion/TosaToLinalg/TosaToLinalg.h" #include "mlir/Conversion/TosaToSCF/TosaToSCF.h" diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td index 698bd0d8fad5..9864d04386fb 100644 --- a/mlir/include/mlir/Conversion/Passes.td +++ b/mlir/include/mlir/Conversion/Passes.td @@ -218,6 +218,54 @@ def ConvertControlFlowToSPIRV : Pass<"convert-cf-to-spirv", "ModuleOp"> { ]; } +//===----------------------------------------------------------------------===// +// FuncToLLVM +//===----------------------------------------------------------------------===// + +def ConvertFuncToLLVM : Pass<"convert-func-to-llvm", "ModuleOp"> { + let summary = "Convert from the Func dialect to the LLVM dialect"; + let description = [{ + Convert Func dialect operations into the LLVM IR dialect operations. + + #### Input invariant + + - no `tensor` types; + - all `vector` are one-dimensional; + - all blocks are reachable by following the successors of the first basic + block; + + If other operations are present and their results are required by the LLVM + IR dialect operations, the pass will fail. Any LLVM IR operations or types + already present in the IR will be kept as is. + + #### Output IR + + Functions converted to LLVM IR. Function arguments types are converted + one-to-one. Function results are converted one-to-one and, in case more than + 1 value is returned, packed into an LLVM IR struct type. Function calls and + returns are updated accordingly. Block argument types are updated to use + LLVM IR types. + }]; + let constructor = "mlir::createConvertFuncToLLVMPass()"; + let dependentDialects = ["LLVM::LLVMDialect"]; + let options = [ + Option<"useBarePtrCallConv", "use-bare-ptr-memref-call-conv", "bool", + /*default=*/"false", + "Replace FuncOp's MemRef arguments with bare pointers to the MemRef " + "element types">, + Option<"emitCWrappers", "emit-c-wrappers", "bool", /*default=*/"false", + "Emit wrappers for C-compatible pointer-to-struct memref " + "descriptors">, + Option<"indexBitwidth", "index-bitwidth", "unsigned", + /*default=kDeriveIndexBitwidthFromDataLayout*/"0", + "Bitwidth of the index type, 0 to use size of machine word">, + Option<"dataLayout", "data-layout", "std::string", + /*default=*/"\"\"", + "String description (LLVM format) of the data layout that is " + "expected on the produced module"> + ]; +} + //===----------------------------------------------------------------------===// // FuncToSPIRV //===----------------------------------------------------------------------===// @@ -617,57 +665,6 @@ def ConvertSPIRVToLLVM : Pass<"convert-spirv-to-llvm", "ModuleOp"> { let dependentDialects = ["LLVM::LLVMDialect"]; } -//===----------------------------------------------------------------------===// -// StandardToLLVM -//===----------------------------------------------------------------------===// - -def ConvertStandardToLLVM : Pass<"convert-std-to-llvm", "ModuleOp"> { - let summary = "Convert scalar and vector operations from the Standard to the " - "LLVM dialect"; - let description = [{ - Convert standard operations into the LLVM IR dialect operations. - - #### Input invariant - - - operations including: arithmetic on integers and floats, constants, - direct calls, returns and branches; - - no `tensor` types; - - all `vector` are one-dimensional; - - all blocks are reachable by following the successors of the first basic - block; - - If other operations are present and their results are required by the LLVM - IR dialect operations, the pass will fail. Any LLVM IR operations or types - already present in the IR will be kept as is. - - #### Output IR - - Functions converted to LLVM IR. Function arguments types are converted - one-to-one. Function results are converted one-to-one and, in case more than - 1 value is returned, packed into an LLVM IR struct type. Function calls and - returns are updated accordingly. Block argument types are updated to use - LLVM IR types. - }]; - let constructor = "mlir::createLowerToLLVMPass()"; - let dependentDialects = ["LLVM::LLVMDialect"]; - let options = [ - Option<"useBarePtrCallConv", "use-bare-ptr-memref-call-conv", "bool", - /*default=*/"false", - "Replace FuncOp's MemRef arguments with bare pointers to the MemRef " - "element types">, - Option<"emitCWrappers", "emit-c-wrappers", "bool", /*default=*/"false", - "Emit wrappers for C-compatible pointer-to-struct memref " - "descriptors">, - Option<"indexBitwidth", "index-bitwidth", "unsigned", - /*default=kDeriveIndexBitwidthFromDataLayout*/"0", - "Bitwidth of the index type, 0 to use size of machine word">, - Option<"dataLayout", "data-layout", "std::string", - /*default=*/"\"\"", - "String description (LLVM format) of the data layout that is " - "expected on the produced module"> - ]; -} - //===----------------------------------------------------------------------===// // TensorToSPIRV //===----------------------------------------------------------------------===// diff --git a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h index 859eadadd7a8..7204e64d047b 100644 --- a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h +++ b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h @@ -26,8 +26,8 @@ class OperationPass; /// This transformation creates a sequence of global variables that are later /// linked to the variables in the kernel module, and a series of copies to/from /// them to emulate the memory transfer from the host or to the device sides. It -/// also converts the remaining Standard dialect into LLVM dialect, emitting C -/// wrappers. +/// also converts the remaining Arithmetic, Func, and MemRef dialects into LLVM +/// dialect, emitting C wrappers. std::unique_ptr> createLowerHostCodeToLLVMPass(); /// Creates a pass to convert SPIR-V operations to the LLVMIR dialect. diff --git a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h deleted file mode 100644 index be86251f0f64..000000000000 --- a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h +++ /dev/null @@ -1,31 +0,0 @@ -//===- ConvertStandardToLLVMPass.h - Pass entrypoint ------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVMPASS_H_ -#define MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVMPASS_H_ - -#include - -namespace mlir { -class LowerToLLVMOptions; -class ModuleOp; -template -class OperationPass; -class Pass; - -/// Creates a pass to convert the Standard dialect into the LLVMIR dialect. -/// stdlib malloc/free is used by default for allocating memrefs allocated with -/// memref.alloc, while LLVM's alloca is used for those allocated with -/// memref.alloca. -std::unique_ptr> createLowerToLLVMPass(); -std::unique_ptr> -createLowerToLLVMPass(const LowerToLLVMOptions &options); - -} // namespace mlir - -#endif // MLIR_CONVERSION_STANDARDTOLLVM_CONVERTSTANDARDTOLLVMPASS_H_ diff --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp index 6b2007a20809..5c337b5f189e 100644 --- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp +++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp @@ -9,9 +9,9 @@ #include "mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h" #include "../PassDetail.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/Async/IR/Async.h" #include "mlir/Dialect/Func/IR/FuncOps.h" diff --git a/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt b/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt index c797998b8551..4d20f43e1a6e 100644 --- a/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt @@ -13,9 +13,9 @@ add_mlir_conversion_library(MLIRAsyncToLLVM LINK_LIBS PUBLIC MLIRArithmetic MLIRAsync + MLIRFuncToLLVM MLIRFuncTransforms MLIRLLVMCommonConversion MLIRLLVMIR - MLIRStandardToLLVM MLIRTransforms ) diff --git a/mlir/lib/Conversion/CMakeLists.txt b/mlir/lib/Conversion/CMakeLists.txt index 5e01109ded0e..6335c4ed371c 100644 --- a/mlir/lib/Conversion/CMakeLists.txt +++ b/mlir/lib/Conversion/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory(ComplexToLLVM) add_subdirectory(ComplexToStandard) add_subdirectory(ControlFlowToLLVM) add_subdirectory(ControlFlowToSPIRV) +add_subdirectory(FuncToLLVM) add_subdirectory(FuncToSPIRV) add_subdirectory(GPUCommon) add_subdirectory(GPUToNVVM) @@ -34,7 +35,6 @@ add_subdirectory(SCFToOpenMP) add_subdirectory(SCFToSPIRV) add_subdirectory(ShapeToStandard) add_subdirectory(SPIRVToLLVM) -add_subdirectory(StandardToLLVM) add_subdirectory(TensorToSPIRV) add_subdirectory(TosaToLinalg) add_subdirectory(TosaToSCF) diff --git a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt b/mlir/lib/Conversion/FuncToLLVM/CMakeLists.txt similarity index 63% rename from mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt rename to mlir/lib/Conversion/FuncToLLVM/CMakeLists.txt index feb42b153e72..ce2318f5c2a0 100644 --- a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/FuncToLLVM/CMakeLists.txt @@ -1,8 +1,8 @@ -add_mlir_conversion_library(MLIRStandardToLLVM - StandardToLLVM.cpp +add_mlir_conversion_library(MLIRFuncToLLVM + FuncToLLVM.cpp ADDITIONAL_HEADER_DIRS - ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/StandardToLLVM + ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/FuncToLLVM DEPENDS MLIRConversionPassIncGen @@ -19,6 +19,5 @@ add_mlir_conversion_library(MLIRStandardToLLVM MLIRFunc MLIRLLVMCommonConversion MLIRLLVMIR - MLIRMath - MLIRTransforms + MLIRTransformUtils ) diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp similarity index 94% rename from mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp rename to mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp index a98d89ea84af..9381ea189ebc 100644 --- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp +++ b/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp @@ -1,4 +1,4 @@ -//===- StandardToLLVM.cpp - Standard to LLVM dialect conversion -----------===// +//===- FuncToLLVM.cpp - Func to LLVM dialect conversion -------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// This file implements a pass to convert MLIR standard and builtin dialects +// This file implements a pass to convert MLIR Func and builtin dialects // into the LLVM IR dialect. // //===----------------------------------------------------------------------===// @@ -15,11 +15,11 @@ #include "mlir/Analysis/DataLayoutAnalysis.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" #include "mlir/Conversion/LLVMCommon/VectorPattern.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Dialect/LLVMIR/FunctionCallUtils.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" @@ -44,7 +44,7 @@ using namespace mlir; -#define PASS_NAME "convert-std-to-llvm" +#define PASS_NAME "convert-func-to-llvm" /// Only retain those attributes that are not constructed by /// `LLVMFuncOp::build`. If `filterArgAttrs` is set, also filter out argument @@ -579,7 +579,7 @@ struct ReturnOpLowering : public ConvertOpToLLVMPattern { }; } // namespace -void mlir::populateStdToLLVMFuncOpConversionPattern( +void mlir::populateFuncToLLVMFuncOpConversionPattern( LLVMTypeConverter &converter, RewritePatternSet &patterns) { if (converter.getOptions().useBarePtrCallConv) patterns.add(converter); @@ -587,9 +587,9 @@ void mlir::populateStdToLLVMFuncOpConversionPattern( patterns.add(converter); } -void mlir::populateStdToLLVMConversionPatterns(LLVMTypeConverter &converter, - RewritePatternSet &patterns) { - populateStdToLLVMFuncOpConversionPattern(converter, patterns); +void mlir::populateFuncToLLVMConversionPatterns(LLVMTypeConverter &converter, + RewritePatternSet &patterns) { + populateFuncToLLVMFuncOpConversionPattern(converter, patterns); // clang-format off patterns.add< CallIndirectOpLowering, @@ -600,12 +600,13 @@ void mlir::populateStdToLLVMConversionPatterns(LLVMTypeConverter &converter, } namespace { -/// A pass converting MLIR operations into the LLVM IR dialect. -struct LLVMLoweringPass : public ConvertStandardToLLVMBase { - LLVMLoweringPass() = default; - LLVMLoweringPass(bool useBarePtrCallConv, bool emitCWrappers, - unsigned indexBitwidth, bool useAlignedAlloc, - const llvm::DataLayout &dataLayout) { +/// A pass converting Func operations into the LLVM IR dialect. +struct ConvertFuncToLLVMPass + : public ConvertFuncToLLVMBase { + ConvertFuncToLLVMPass() = default; + ConvertFuncToLLVMPass(bool useBarePtrCallConv, bool emitCWrappers, + unsigned indexBitwidth, bool useAlignedAlloc, + const llvm::DataLayout &dataLayout) { this->useBarePtrCallConv = useBarePtrCallConv; this->emitCWrappers = emitCWrappers; this->indexBitwidth = indexBitwidth; @@ -644,7 +645,9 @@ struct LLVMLoweringPass : public ConvertStandardToLLVMBase { &dataLayoutAnalysis); RewritePatternSet patterns(&getContext()); - populateStdToLLVMConversionPatterns(typeConverter, patterns); + populateFuncToLLVMConversionPatterns(typeConverter, patterns); + + // TODO: Remove these in favor of their dedicated conversion passes. arith::populateArithmeticToLLVMConversionPatterns(typeConverter, patterns); cf::populateControlFlowToLLVMConversionPatterns(typeConverter, patterns); @@ -658,20 +661,20 @@ struct LLVMLoweringPass : public ConvertStandardToLLVMBase { }; } // namespace -std::unique_ptr> mlir::createLowerToLLVMPass() { - return std::make_unique(); +std::unique_ptr> mlir::createConvertFuncToLLVMPass() { + return std::make_unique(); } std::unique_ptr> -mlir::createLowerToLLVMPass(const LowerToLLVMOptions &options) { +mlir::createConvertFuncToLLVMPass(const LowerToLLVMOptions &options) { auto allocLowering = options.allocLowering; // There is no way to provide additional patterns for pass, so // AllocLowering::None will always fail. assert(allocLowering != LowerToLLVMOptions::AllocLowering::None && - "LLVMLoweringPass doesn't support AllocLowering::None"); + "ConvertFuncToLLVMPass doesn't support AllocLowering::None"); bool useAlignedAlloc = (allocLowering == LowerToLLVMOptions::AllocLowering::AlignedAlloc); - return std::make_unique( + return std::make_unique( options.useBarePtrCallConv, options.emitCWrappers, options.getIndexBitwidth(), useAlignedAlloc, options.dataLayout); } diff --git a/mlir/lib/Conversion/GPUCommon/CMakeLists.txt b/mlir/lib/Conversion/GPUCommon/CMakeLists.txt index 92eb95ab42e0..7166d1ad6b3a 100644 --- a/mlir/lib/Conversion/GPUCommon/CMakeLists.txt +++ b/mlir/lib/Conversion/GPUCommon/CMakeLists.txt @@ -32,6 +32,7 @@ add_mlir_conversion_library(MLIRGPUToGPURuntimeTransforms MLIRArithmeticToLLVM MLIRAsyncToLLVM MLIRControlFlowToLLVM + MLIRFuncToLLVM MLIRGPUTransforms MLIRIR MLIRLLVMCommonConversion @@ -39,6 +40,5 @@ add_mlir_conversion_library(MLIRGPUToGPURuntimeTransforms MLIRMemRefToLLVM MLIRPass MLIRSupport - MLIRStandardToLLVM MLIRVectorToLLVM ) diff --git a/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp b/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp index 1aa12500c571..49484717abdc 100644 --- a/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp +++ b/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp @@ -19,11 +19,11 @@ #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h" #include "mlir/Dialect/Async/IR/Async.h" #include "mlir/Dialect/GPU/GPUDialect.h" @@ -374,7 +374,7 @@ void GpuToLLVMConversionPass::runOnOperation() { mlir::cf::populateControlFlowToLLVMConversionPatterns(converter, patterns); populateVectorToLLVMConversionPatterns(converter, patterns); populateMemRefToLLVMConversionPatterns(converter, patterns); - populateStdToLLVMConversionPatterns(converter, patterns); + populateFuncToLLVMConversionPatterns(converter, patterns); populateAsyncStructuralTypeConversionsAndLegality(converter, patterns, target); populateGpuToLLVMConversionPatterns(converter, patterns, gpuBinaryAnnotation); diff --git a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt index a5c98a442b26..8a5d4a622a74 100644 --- a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt +++ b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt @@ -12,6 +12,7 @@ add_mlir_conversion_library(MLIRGPUToNVVMTransforms LINK_LIBS PUBLIC MLIRArithmeticToLLVM + MLIRFuncToLLVM MLIRGPUOps MLIRGPUToGPURuntimeTransforms MLIRLLVMCommonConversion @@ -19,6 +20,5 @@ add_mlir_conversion_library(MLIRGPUToNVVMTransforms MLIRMemRefToLLVM MLIRNVVMIR MLIRPass - MLIRStandardToLLVM MLIRTransformUtils ) diff --git a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp index 44e762490735..37d6541cd02b 100644 --- a/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp +++ b/mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp @@ -15,11 +15,11 @@ #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/LoweringOptions.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h" #include "mlir/Dialect/GPU/GPUDialect.h" @@ -264,7 +264,7 @@ struct LowerGpuOpsToNVVMOpsPass arith::populateArithmeticToLLVMConversionPatterns(converter, llvmPatterns); cf::populateControlFlowToLLVMConversionPatterns(converter, llvmPatterns); - populateStdToLLVMConversionPatterns(converter, llvmPatterns); + populateFuncToLLVMConversionPatterns(converter, llvmPatterns); populateMemRefToLLVMConversionPatterns(converter, llvmPatterns); populateGpuToNVVMConversionPatterns(converter, llvmPatterns); populateGpuWMMAToNVVMConversionPatterns(converter, llvmPatterns); diff --git a/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt b/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt index 7b9798227c2a..86fd184243e6 100644 --- a/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt +++ b/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt @@ -11,6 +11,7 @@ add_mlir_conversion_library(MLIRGPUToROCDLTransforms LINK_LIBS PUBLIC MLIRArithmeticToLLVM + MLIRFuncToLLVM MLIRGPUOps MLIRGPUToGPURuntimeTransforms MLIRLLVMCommonConversion @@ -18,6 +19,5 @@ add_mlir_conversion_library(MLIRGPUToROCDLTransforms MLIRMemRefToLLVM MLIRROCDLIR MLIRPass - MLIRStandardToLLVM MLIRVectorToROCDL ) diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp index 38bf0efcdf08..043b66e85f40 100644 --- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp +++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp @@ -15,11 +15,11 @@ #include "mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/LoweringOptions.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h" #include "mlir/Conversion/VectorToROCDL/VectorToROCDL.h" #include "mlir/Dialect/GPU/GPUDialect.h" @@ -80,7 +80,7 @@ struct LowerGpuOpsToROCDLOpsPass populateVectorToLLVMConversionPatterns(converter, llvmPatterns); populateVectorToROCDLConversionPatterns(converter, llvmPatterns); cf::populateControlFlowToLLVMConversionPatterns(converter, llvmPatterns); - populateStdToLLVMConversionPatterns(converter, llvmPatterns); + populateFuncToLLVMConversionPatterns(converter, llvmPatterns); populateMemRefToLLVMConversionPatterns(converter, llvmPatterns); populateGpuToROCDLConversionPatterns(converter, llvmPatterns, runtime); LLVMConversionTarget target(getContext()); diff --git a/mlir/lib/Conversion/OpenMPToLLVM/CMakeLists.txt b/mlir/lib/Conversion/OpenMPToLLVM/CMakeLists.txt index 40c1298cd0f6..998252353b17 100644 --- a/mlir/lib/Conversion/OpenMPToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/OpenMPToLLVM/CMakeLists.txt @@ -13,11 +13,11 @@ add_mlir_conversion_library(MLIROpenMPToLLVM LINK_LIBS PUBLIC MLIRArithmeticToLLVM + MLIRFuncToLLVM MLIRIR MLIRLLVMCommonConversion MLIRLLVMIR MLIRMemRefToLLVM MLIROpenMP - MLIRStandardToLLVM MLIRTransforms ) diff --git a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp index f2cb819d6646..ddbb0517a003 100644 --- a/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp +++ b/mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp @@ -11,11 +11,11 @@ #include "../PassDetail.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" #include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/Dialect/OpenMP/OpenMPDialect.h" @@ -70,7 +70,7 @@ void ConvertOpenMPToLLVMPass::runOnOperation() { arith::populateArithmeticToLLVMConversionPatterns(converter, patterns); cf::populateControlFlowToLLVMConversionPatterns(converter, patterns); populateMemRefToLLVMConversionPatterns(converter, patterns); - populateStdToLLVMConversionPatterns(converter, patterns); + populateFuncToLLVMConversionPatterns(converter, patterns); populateOpenMPToLLVMConversionPatterns(converter, patterns); LLVMConversionTarget target(getContext()); diff --git a/mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt b/mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt index 73001eef8080..2f38cd987310 100644 --- a/mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt @@ -12,13 +12,13 @@ add_mlir_conversion_library(MLIRSPIRVToLLVM LINK_LIBS PUBLIC MLIRArithmeticToLLVM + MLIRFuncToLLVM MLIRGPUOps - MLIRSPIRV - MLIRSPIRVUtils + MLIRIR MLIRLLVMCommonConversion MLIRLLVMIR MLIRMemRefToLLVM - MLIRStandardToLLVM - MLIRIR + MLIRSPIRV + MLIRSPIRVUtils MLIRTransforms ) diff --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp index 4534d23ae90a..5619e08f4e9e 100644 --- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp +++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp @@ -13,13 +13,13 @@ #include "../PassDetail.h" #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/LoweringOptions.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" #include "mlir/Conversion/LLVMCommon/TypeConverter.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h" #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Dialect/GPU/GPUDialect.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h" @@ -280,8 +280,7 @@ public: llvm::make_early_inc_range(module.getOps())) gpuModule.erase(); - // Specify options to lower Standard to LLVM and pull in the conversion - // patterns. + // Specify options to lower to LLVM and pull in the conversion patterns. LowerToLLVMOptions options(module.getContext()); options.emitCWrappers = true; auto *context = module.getContext(); @@ -290,7 +289,7 @@ public: mlir::arith::populateArithmeticToLLVMConversionPatterns(typeConverter, patterns); populateMemRefToLLVMConversionPatterns(typeConverter, patterns); - populateStdToLLVMConversionPatterns(typeConverter, patterns); + populateFuncToLLVMConversionPatterns(typeConverter, patterns); patterns.add(typeConverter); // Pull in SPIR-V type conversion patterns to convert SPIR-V global diff --git a/mlir/lib/Conversion/VectorToROCDL/CMakeLists.txt b/mlir/lib/Conversion/VectorToROCDL/CMakeLists.txt index 44ed37229210..4d701ce4d554 100644 --- a/mlir/lib/Conversion/VectorToROCDL/CMakeLists.txt +++ b/mlir/lib/Conversion/VectorToROCDL/CMakeLists.txt @@ -12,10 +12,10 @@ add_mlir_conversion_library(MLIRVectorToROCDL Core LINK_LIBS PUBLIC + MLIRFuncToLLVM MLIRROCDLIR MLIRLLVMCommonConversion MLIRMemRefToLLVM - MLIRStandardToLLVM MLIRVector MLIRTransforms ) diff --git a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp index 9865e14eb0d4..fc906bfcd16c 100644 --- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp +++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp @@ -14,10 +14,10 @@ #include "mlir/Conversion/VectorToROCDL/VectorToROCDL.h" #include "../PassDetail.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Dialect/GPU/GPUDialect.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/Dialect/LLVMIR/ROCDLDialect.h" @@ -165,7 +165,7 @@ void LowerVectorToROCDLPass::runOnOperation() { populateVectorToROCDLConversionPatterns(converter, patterns); populateMemRefToLLVMConversionPatterns(converter, patterns); - populateStdToLLVMConversionPatterns(converter, patterns); + populateFuncToLLVMConversionPatterns(converter, patterns); LLVMConversionTarget target(getContext()); target.addLegalDialect(); diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt index f1fbbf3d158e..f530fe2b6467 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt @@ -40,6 +40,7 @@ add_mlir_dialect_library(MLIRLinalgTransforms MLIRBufferization MLIRComplex MLIRFunc + MLIRFuncToLLVM MLIRFuncTransforms MLIRInferTypeOpInterface MLIRIR @@ -53,7 +54,6 @@ add_mlir_dialect_library(MLIRLinalgTransforms MLIRSCFUtils MLIRPass MLIRSparseTensor - MLIRStandardToLLVM MLIRTensor MLIRTensorTilingInterfaceImpl MLIRTensorTransforms diff --git a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp index 6d0d674c6d72..29231774fc86 100644 --- a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp +++ b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp @@ -47,7 +47,7 @@ void mlir::sparse_tensor::buildSparseCompiler( pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions())); pm.addPass(createMemRefToLLVMPass()); pm.addNestedPass(createConvertMathToLLVMPass()); - pm.addPass(createLowerToLLVMPass()); // --convert-std-to-llvm + pm.addPass(createConvertFuncToLLVMPass()); pm.addPass(createReconcileUnrealizedCastsPass()); } diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt index f067a04bcdde..ca5182e4f002 100644 --- a/mlir/lib/ExecutionEngine/CMakeLists.txt +++ b/mlir/lib/ExecutionEngine/CMakeLists.txt @@ -78,12 +78,12 @@ add_mlir_library(MLIRJitRunner ${dialect_libs} MLIRExecutionEngine MLIRFunc + MLIRFuncToLLVM MLIRIR MLIRParser MLIRLLVMToLLVMIRTranslation MLIRTargetLLVMIRExport MLIRTransforms - MLIRStandardToLLVM MLIRSupport ) diff --git a/mlir/test/CAPI/execution_engine.c b/mlir/test/CAPI/execution_engine.c index 22922c6faa12..73750c83fdca 100644 --- a/mlir/test/CAPI/execution_engine.c +++ b/mlir/test/CAPI/execution_engine.c @@ -27,7 +27,7 @@ void lowerModuleToLLVM(MlirContext ctx, MlirModule module) { MlirPassManager pm = mlirPassManagerCreate(ctx); MlirOpPassManager opm = mlirPassManagerGetNestedUnder( pm, mlirStringRefCreateFromCString("builtin.func")); - mlirPassManagerAddOwnedPass(pm, mlirCreateConversionConvertStandardToLLVM()); + mlirPassManagerAddOwnedPass(pm, mlirCreateConversionConvertFuncToLLVM()); mlirOpPassManagerAddOwnedPass(opm, mlirCreateConversionConvertArithmeticToLLVM()); MlirLogicalResult status = mlirPassManagerRun(pm, module); diff --git a/mlir/test/Conversion/ComplexToLLVM/full-conversion.mlir b/mlir/test/Conversion/ComplexToLLVM/full-conversion.mlir index de751c1eedf6..6e27c23349b9 100644 --- a/mlir/test/Conversion/ComplexToLLVM/full-conversion.mlir +++ b/mlir/test/Conversion/ComplexToLLVM/full-conversion.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-complex-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | FileCheck %s +// RUN: mlir-opt %s -convert-complex-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | FileCheck %s // CHECK-LABEL: llvm.func @complex_div // CHECK-SAME: %[[LHS:.*]]: ![[C_TY:.*>]], %[[RHS:.*]]: ![[C_TY]]) -> ![[C_TY]] diff --git a/mlir/test/Conversion/ComplexToStandard/full-conversion.mlir b/mlir/test/Conversion/ComplexToStandard/full-conversion.mlir index 774ffe8d29cf..77e0f2b1ce26 100644 --- a/mlir/test/Conversion/ComplexToStandard/full-conversion.mlir +++ b/mlir/test/Conversion/ComplexToStandard/full-conversion.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-complex-to-standard -convert-complex-to-llvm -convert-math-to-llvm -convert-arith-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | FileCheck %s +// RUN: mlir-opt %s -convert-complex-to-standard -convert-complex-to-llvm -convert-math-to-llvm -convert-arith-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | FileCheck %s // CHECK-LABEL: llvm.func @complex_abs // CHECK-SAME: %[[ARG:.*]]: ![[C_TY:.*]]) diff --git a/mlir/test/Conversion/StandardToLLVM/calling-convention.mlir b/mlir/test/Conversion/FuncToLLVM/calling-convention.mlir similarity index 98% rename from mlir/test/Conversion/StandardToLLVM/calling-convention.mlir rename to mlir/test/Conversion/FuncToLLVM/calling-convention.mlir index 332c67c63705..d8dc4d28c32d 100644 --- a/mlir/test/Conversion/StandardToLLVM/calling-convention.mlir +++ b/mlir/test/Conversion/FuncToLLVM/calling-convention.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt -convert-memref-to-llvm -convert-std-to-llvm='emit-c-wrappers=1' -reconcile-unrealized-casts %s | FileCheck %s -// RUN: mlir-opt -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts %s | FileCheck %s --check-prefix=EMIT_C_ATTRIBUTE +// RUN: mlir-opt -convert-memref-to-llvm -convert-func-to-llvm='emit-c-wrappers=1' -reconcile-unrealized-casts %s | FileCheck %s +// RUN: mlir-opt -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts %s | FileCheck %s --check-prefix=EMIT_C_ATTRIBUTE // This tests the default memref calling convention and the emission of C // wrappers. We don't need to separate runs because the wrapper-emission diff --git a/mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir b/mlir/test/Conversion/FuncToLLVM/convert-argattrs.mlir similarity index 93% rename from mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir rename to mlir/test/Conversion/FuncToLLVM/convert-argattrs.mlir index 7c9a0c19790e..01e356219064 100644 --- a/mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir +++ b/mlir/test/Conversion/FuncToLLVM/convert-argattrs.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt -convert-std-to-llvm %s | FileCheck %s +// RUN: mlir-opt -convert-func-to-llvm %s | FileCheck %s // CHECK-LABEL: func @check_attributes // When expanding the memref to multiple arguments, argument attributes are replicated. diff --git a/mlir/test/Conversion/FuncToLLVM/convert-data-layout.mlir b/mlir/test/Conversion/FuncToLLVM/convert-data-layout.mlir new file mode 100644 index 000000000000..505ceeab3abf --- /dev/null +++ b/mlir/test/Conversion/FuncToLLVM/convert-data-layout.mlir @@ -0,0 +1,6 @@ +// RUN: mlir-opt -convert-func-to-llvm %s | FileCheck %s +// RUN-32: mlir-opt -convert-func-to-llvm='data-layout=p:32:32:32' %s | FileCheck %s + +// CHECK: module attributes {llvm.data_layout = ""} +// CHECK-32: module attributes {llvm.data_layout ="p:32:32:32"} +module {} diff --git a/mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir b/mlir/test/Conversion/FuncToLLVM/convert-funcs.mlir similarity index 96% rename from mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir rename to mlir/test/Conversion/FuncToLLVM/convert-funcs.mlir index 6e871bf83a86..7c42f8e3e195 100644 --- a/mlir/test/Conversion/StandardToLLVM/convert-funcs.mlir +++ b/mlir/test/Conversion/FuncToLLVM/convert-funcs.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt -convert-std-to-llvm -split-input-file -verify-diagnostics %s | FileCheck %s +// RUN: mlir-opt -convert-func-to-llvm -split-input-file -verify-diagnostics %s | FileCheck %s //CHECK: llvm.func @second_order_arg(!llvm.ptr>) func private @second_order_arg(%arg0 : () -> ()) diff --git a/mlir/test/Conversion/StandardToLLVM/convert-types.mlir b/mlir/test/Conversion/FuncToLLVM/convert-types.mlir similarity index 100% rename from mlir/test/Conversion/StandardToLLVM/convert-types.mlir rename to mlir/test/Conversion/FuncToLLVM/convert-types.mlir diff --git a/mlir/test/Conversion/StandardToLLVM/func-memref-return.mlir b/mlir/test/Conversion/FuncToLLVM/func-memref-return.mlir similarity index 96% rename from mlir/test/Conversion/StandardToLLVM/func-memref-return.mlir rename to mlir/test/Conversion/FuncToLLVM/func-memref-return.mlir index 7fe6ce0d02b0..89a56df36f52 100644 --- a/mlir/test/Conversion/StandardToLLVM/func-memref-return.mlir +++ b/mlir/test/Conversion/FuncToLLVM/func-memref-return.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt -convert-std-to-llvm -reconcile-unrealized-casts %s | FileCheck %s -// RUN: mlir-opt -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -split-input-file %s | FileCheck %s --check-prefix=BAREPTR +// RUN: mlir-opt -convert-func-to-llvm -reconcile-unrealized-casts %s | FileCheck %s +// RUN: mlir-opt -convert-func-to-llvm='use-bare-ptr-memref-call-conv=1' -split-input-file %s | FileCheck %s --check-prefix=BAREPTR // These tests were separated from func-memref.mlir because applying // -reconcile-unrealized-casts resulted in `llvm.extractvalue` ops getting diff --git a/mlir/test/Conversion/StandardToLLVM/func-memref.mlir b/mlir/test/Conversion/FuncToLLVM/func-memref.mlir similarity index 93% rename from mlir/test/Conversion/StandardToLLVM/func-memref.mlir rename to mlir/test/Conversion/FuncToLLVM/func-memref.mlir index 463f31d9cff5..4b6b5d473bea 100644 --- a/mlir/test/Conversion/StandardToLLVM/func-memref.mlir +++ b/mlir/test/Conversion/FuncToLLVM/func-memref.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt -convert-arith-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts -split-input-file %s | FileCheck %s -// RUN: mlir-opt -convert-arith-to-llvm -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -reconcile-unrealized-casts -split-input-file %s | FileCheck %s --check-prefix=BAREPTR +// RUN: mlir-opt -convert-arith-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts -split-input-file %s | FileCheck %s +// RUN: mlir-opt -convert-arith-to-llvm -convert-func-to-llvm='use-bare-ptr-memref-call-conv=1' -reconcile-unrealized-casts -split-input-file %s | FileCheck %s --check-prefix=BAREPTR // BAREPTR-LABEL: func @check_noalias // BAREPTR-SAME: %{{.*}}: !llvm.ptr {llvm.noalias}, %{{.*}}: !llvm.ptr {llvm.noalias} diff --git a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir b/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir similarity index 98% rename from mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir rename to mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir index e774b9085db6..5dfdf4d82166 100644 --- a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir +++ b/mlir/test/Conversion/FuncToLLVM/func-to-llvm.mlir @@ -1,5 +1,5 @@ -// RUN: mlir-opt -convert-math-to-llvm -convert-arith-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts %s -split-input-file | FileCheck %s -// RUN: mlir-opt -convert-math-to-llvm -convert-arith-to-llvm='index-bitwidth=32' -convert-std-to-llvm='index-bitwidth=32' -reconcile-unrealized-casts %s -split-input-file | FileCheck --check-prefix=CHECK32 %s +// RUN: mlir-opt -convert-math-to-llvm -convert-arith-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts %s -split-input-file | FileCheck %s +// RUN: mlir-opt -convert-math-to-llvm -convert-arith-to-llvm='index-bitwidth=32' -convert-func-to-llvm='index-bitwidth=32' -reconcile-unrealized-casts %s -split-input-file | FileCheck --check-prefix=CHECK32 %s // CHECK-LABEL: func @empty() { // CHECK-NEXT: llvm.return diff --git a/mlir/test/Conversion/StandardToLLVM/invalid.mlir b/mlir/test/Conversion/FuncToLLVM/invalid.mlir similarity index 73% rename from mlir/test/Conversion/StandardToLLVM/invalid.mlir rename to mlir/test/Conversion/FuncToLLVM/invalid.mlir index 5b6e7577cc77..1e1469ff2dfb 100644 --- a/mlir/test/Conversion/StandardToLLVM/invalid.mlir +++ b/mlir/test/Conversion/FuncToLLVM/invalid.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-std-to-llvm -verify-diagnostics -split-input-file +// RUN: mlir-opt %s -convert-func-to-llvm -verify-diagnostics -split-input-file // Should not crash on unsupported types in function signatures. func private @unsupported_signature() -> tensor<10 x i32> diff --git a/mlir/test/Conversion/StandardToLLVM/convert-data-layout.mlir b/mlir/test/Conversion/StandardToLLVM/convert-data-layout.mlir deleted file mode 100644 index 5086de2f5d05..000000000000 --- a/mlir/test/Conversion/StandardToLLVM/convert-data-layout.mlir +++ /dev/null @@ -1,6 +0,0 @@ -// RUN: mlir-opt -convert-std-to-llvm %s | FileCheck %s -// RUN-32: mlir-opt -convert-std-to-llvm='data-layout=p:32:32:32' %s | FileCheck %s - -// CHECK: module attributes {llvm.data_layout = ""} -// CHECK-32: module attributes {llvm.data_layout ="p:32:32:32"} -module {} diff --git a/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir b/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir index ae495d660f6b..93bb4143e575 100644 --- a/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir +++ b/mlir/test/Dialect/ArmSVE/legalize-for-llvm.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-llvm="enable-arm-sve" -convert-std-to-llvm -reconcile-unrealized-casts | mlir-opt | FileCheck %s +// RUN: mlir-opt %s -convert-vector-to-llvm="enable-arm-sve" -convert-func-to-llvm -reconcile-unrealized-casts | mlir-opt | FileCheck %s func @arm_sve_sdot(%a: vector<[16]xi8>, %b: vector<[16]xi8>, diff --git a/mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir b/mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir index 6b215e81d2e4..1b62fefa7ec9 100644 --- a/mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir +++ b/mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir @@ -10,7 +10,7 @@ // RUN: -memref-expand \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O3 \ @@ -24,7 +24,7 @@ // RUN: -convert-scf-to-cf \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O3 \ diff --git a/mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir b/mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir index 372e626d727b..9dabde643cf6 100644 --- a/mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir +++ b/mlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir @@ -10,7 +10,7 @@ // RUN: -memref-expand \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O3 \ @@ -31,7 +31,7 @@ // RUN: -memref-expand \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O3 \ @@ -45,7 +45,7 @@ // RUN: -convert-scf-to-cf \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O3 \ diff --git a/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir b/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir index 9c143a25bce6..4ad1502ba5e3 100644 --- a/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir +++ b/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir @@ -7,7 +7,7 @@ // RUN: -convert-memref-to-llvm \ // RUN: -arith-expand \ // RUN: -memref-expand \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ @@ -23,7 +23,7 @@ // RUN: -convert-memref-to-llvm \ // RUN: -arith-expand \ // RUN: -memref-expand \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ @@ -42,7 +42,7 @@ // RUN: -convert-memref-to-llvm \ // RUN: -arith-expand \ // RUN: -memref-expand \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ diff --git a/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir b/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir index bb4687f06255..eb2b37763530 100644 --- a/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir +++ b/mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir @@ -6,7 +6,7 @@ // RUN: -convert-async-to-llvm \ // RUN: -convert-scf-to-cf \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ @@ -21,7 +21,7 @@ // RUN: -convert-async-to-llvm \ // RUN: -convert-scf-to-cf \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ @@ -39,7 +39,7 @@ // RUN: -convert-async-to-llvm \ // RUN: -convert-scf-to-cf \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e entry -entry-point-result=void -O0 \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/benchmark_matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/benchmark_matmul.mlir index 92eb86395178..e88ccd55f6e0 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/benchmark_matmul.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/benchmark_matmul.mlir @@ -5,7 +5,7 @@ // RUN: mlir-opt -test-linalg-codegen-strategy="anchor-func=matmul anchor-op=memref.copy register-tile-sizes=4,32 vectorize" | \ // RUN: mlir-opt -canonicalize -convert-vector-to-scf -lower-affine -convert-linalg-to-loops | \ -// RUN: mlir-opt -canonicalize -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt -canonicalize -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -O3 -e main -entry-point-result=void \ // Activate to dump assembly // R_UN: -dump-object-file -object-filename=/tmp/a.o \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir index 11bb57b1a9d4..5be02fe1e17c 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -O3 -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir index b15809f87572..668b5b51fff9 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -O3 -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir index 580b6e0f1a4e..c724f9fb1447 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -linalg-bufferize \ // RUN: -arith-bufferize -tensor-bufferize -func-bufferize \ // RUN: -finalizing-bufferize -buffer-deallocation -convert-linalg-to-llvm \ -// RUN: -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir index d4437a967536..ae34d737f506 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-comprehensive-bufferize.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -canonicalize -cse -linalg-comprehensive-module-bufferize |\ // RUN: mlir-opt -buffer-deallocation -convert-vector-to-scf -lower-affine -convert-linalg-to-loops |\ -// RUN: mlir-opt -canonicalize -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt -canonicalize -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -O3 -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext |\ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir index 6355d4ea2928..bceb9b20c7ac 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=4" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir index 31761fe8552b..6c1ff9070159 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=2,4" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir index 058376a1437c..5f33579e692d 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir index 5244dd3753e9..fb5732effc9f 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=2,3,3,2" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir index f4e0afb4b4dd..ce077654cb94 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=2,2,2" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir index 8d0f81ddeb76..03b7bc2d71ea 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir @@ -1,10 +1,10 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s // RUN: mlir-opt %s -linalg-tile="tile-sizes=0,5,5,5" -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir index 86b5ed962b2f..5a08bc369ffe 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -convert-elementwise-to-linalg \ // RUN: -arith-bufferize -linalg-bufferize -tensor-bufferize \ // RUN: -func-bufferize -buffer-deallocation -convert-linalg-to-loops \ -// RUN: -convert-linalg-to-llvm --convert-memref-to-llvm -convert-std-to-llvm \ +// RUN: -convert-linalg-to-llvm --convert-memref-to-llvm -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir index 794365af222c..75b35eea2cd0 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -linalg-bufferize \ // RUN: -arith-bufferize -tensor-bufferize -func-bufferize \ // RUN: -finalizing-bufferize -buffer-deallocation -convert-linalg-to-llvm \ -// RUN: -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir index b351d70d6325..ff0306909e45 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -test-linalg-transform-patterns=test-linalg-to-vector-patterns \ // RUN: -linalg-bufferize -arith-bufferize -tensor-bufferize -func-bufferize \ // RUN: -finalizing-bufferize -buffer-deallocation \ -// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir index bfd705364ffb..835a55c054a9 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -linalg-bufferize \ // RUN: -arith-bufferize -tensor-bufferize -func-bufferize \ // RUN: -finalizing-bufferize -buffer-deallocation \ -// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir index c4e3a7157a7d..ca63452fe0f7 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir @@ -1,7 +1,7 @@ // RUN: mlir-opt %s -linalg-bufferize \ // RUN: -arith-bufferize -tensor-bufferize -func-bufferize \ // RUN: -finalizing-bufferize -buffer-deallocation \ -// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-loops -convert-scf-to-cf -convert-linalg-to-llvm --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir index 714db859ac56..5404ca6e3a24 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -arith-bufferize -linalg-bufferize \ // RUN: -tensor-bufferize -func-bufferize -finalizing-bufferize -buffer-deallocation -convert-linalg-to-loops \ -// RUN: -convert-linalg-to-llvm --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir index 7a4e3b4fbc4a..57e45d8e9b32 100644 --- a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir +++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir @@ -1,7 +1,7 @@ // UNSUPPORTED: asan // RUN: mlir-opt %s -linalg-bufferize -arith-bufferize \ // RUN: -tensor-bufferize -func-bufferize -finalizing-bufferize -buffer-deallocation -convert-linalg-to-loops -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s @@ -10,7 +10,7 @@ // RUN: -scf-bufferize -arith-bufferize -tensor-bufferize \ // RUN: -func-bufferize \ // RUN: -finalizing-bufferize -convert-linalg-to-loops -convert-scf-to-cf -convert-scf-to-cf \ -// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-linalg-to-llvm -lower-affine -convert-scf-to-cf --convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Memref/memref_abi.c b/mlir/test/Integration/Dialect/Memref/memref_abi.c index 4955654170a8..226529c6df04 100644 --- a/mlir/test/Integration/Dialect/Memref/memref_abi.c +++ b/mlir/test/Integration/Dialect/Memref/memref_abi.c @@ -4,7 +4,7 @@ // Compile the MLIR file to LLVM: // RUN: mlir-opt %t/input.mlir \ // RUN: -lower-affine -convert-scf-to-cf -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm -reconcile-unrealized-casts \ +// RUN: -convert-func-to-llvm -reconcile-unrealized-casts \ // RUN: | mlir-translate --mlir-to-llvmir -o %t.ll // Generate an object file for the MLIR code diff --git a/mlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir b/mlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir index 4ecd106423ed..84d04f19218a 100644 --- a/mlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir +++ b/mlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf \ // RUN: -memref-expand -arith-expand -convert-vector-to-llvm \ -// RUN: -convert-memref-to-llvm -convert-std-to-llvm \ +// RUN: -convert-memref-to-llvm -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir b/mlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir index 5fb24c633ef9..efcc3d2a3050 100644 --- a/mlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir +++ b/mlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext | FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf-full.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf-full.mlir index 5451e0d26302..75be0e4f1ac7 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf-full.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf-full.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf \ // RUN: -arith-bufferize -convert-vector-to-llvm="enable-amx" \ -// RUN: -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" \ // RUN: --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir index 92f8d9571e18..11cfd18b04fa 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir index c5006bbb5208..bbc14b32e66c 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-full.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-full.mlir index 0fe686d8ba39..272a2db4d6cf 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-full.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-full.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf \ // RUN: -arith-bufferize -convert-vector-to-llvm="enable-amx" \ -// RUN: -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" \ // RUN: --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir index 01127cab5b6a..8e708b430f68 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir index 7c6533ed002d..aa367b7f5eef 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir index 7b41f2be8b04..0789ed121904 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm="enable-amx" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate -mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="+amx-tile,+amx-int8,+amx-bf16" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-dot.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-dot.mlir index b69a75de009e..c50aebfd1965 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-dot.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-dot.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate --mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="avx" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-inline-asm-vector-avx512.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-inline-asm-vector-avx512.mlir index 866a960e7866..5f2613396984 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-inline-asm-vector-avx512.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-inline-asm-vector-avx512.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -convert-arith-to-llvm -reconcile-unrealized-casts |\ +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm='use-bare-ptr-memref-call-conv=1' -convert-arith-to-llvm -reconcile-unrealized-casts |\ // RUN: mlir-translate --mlir-to-llvmir |\ // RUN: %lli --entry-function=entry --mattr="avx512f" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext |\ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-mask-compress.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-mask-compress.mlir index ac7cb72298bb..3aad70fa6458 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-mask-compress.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-mask-compress.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate --mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="avx512bw" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-rsqrt.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-rsqrt.mlir index 490382e2f813..1971b6b94bd0 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-rsqrt.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-rsqrt.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-llvm="enable-x86vector" -convert-std-to-llvm | \ +// RUN: mlir-opt %s -convert-vector-to-llvm="enable-x86vector" -convert-func-to-llvm | \ // RUN: mlir-translate --mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="avx" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir index 9c78426ea4d9..4e8ebe9c08e1 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate --mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="avx512bw,avx512vp2intersect" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-vp2intersect-i32.mlir b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-vp2intersect-i32.mlir index 027aa5f391d7..71d4492e7691 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-vp2intersect-i32.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-vp2intersect-i32.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm="enable-x86vector" -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-translate --mlir-to-llvmir | \ // RUN: %lli --entry-function=entry --mattr="avx512bw,avx512vp2intersect" --dlopen=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir index 19c099cebf94..1f4d69b32a59 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-broadcast.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-broadcast.mlir index 195845532a8d..eb42499f914f 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-broadcast.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-broadcast.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-compress.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-compress.mlir index afc9e655314d..d9829f3574b6 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-compress.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-compress.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-constant-mask.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-constant-mask.mlir index efcec5913881..488e2d9fe2b1 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-constant-mask.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-constant-mask.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-contraction.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-contraction.mlir index 1976cdd5bf20..c26988510362 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-contraction.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-contraction.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask-v4i1.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask-v4i1.mlir index 96bee30c07d7..54154ce75836 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask-v4i1.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask-v4i1.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask.mlir index 15bd627b3a57..f2e51d0e8049 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-create-mask.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-expand.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-expand.mlir index 44b87cff33bd..3ee924d063e2 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-expand.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-expand.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-extract-strided-slice.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-extract-strided-slice.mlir index 477f3a149fb8..01cb1e4e73a4 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-extract-strided-slice.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-extract-strided-slice.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-col.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-col.mlir index 5d5ca6777441..096a43a2efc6 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-col.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-col.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -lower-matrix-intrinsics -matrix-allow-contract -matrix-default-layout=column-major \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-row.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-row.mlir index ad7e9c9779f1..76d04e53f083 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-row.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-flat-transpose-row.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -lower-matrix-intrinsics -matrix-allow-contract -matrix-default-layout=row-major \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-fma.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-fma.mlir index 3a5c0f212633..50171870f68d 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-fma.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-fma.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-gather.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-gather.mlir index 4ae08567382b..4e1275541eba 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-gather.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-gather.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-index-vectors.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-index-vectors.mlir index c15a8c4515b9..ca125c8a1f65 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-index-vectors.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-index-vectors.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-insert-strided-slice.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-insert-strided-slice.mlir index 449d55a01e9d..08ef0040b071 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-insert-strided-slice.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-insert-strided-slice.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-maskedload.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-maskedload.mlir index 6133d6a74b3a..59b9ef642390 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-maskedload.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-maskedload.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-maskedstore.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-maskedstore.mlir index a9ace32d43a7..3930a1516cbb 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-maskedstore.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-maskedstore.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-col.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-col.mlir index 7b433f26d5b8..a4795672e840 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-col.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-col.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -lower-matrix-intrinsics -matrix-allow-contract -matrix-default-layout=column-major \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-row.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-row.mlir index 213e2e6e942c..c8918ce91c8c 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-row.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-matrix-multiply-row.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -lower-matrix-intrinsics -matrix-allow-contract -matrix-default-layout=row-major \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-f32.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-f32.mlir index ca9d06ea8a05..9a9842ce6c1b 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-f32.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-f32.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-i64.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-i64.mlir index 807ef2162c34..e4c0bd51e37c 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-i64.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-outerproduct-i64.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-print-int.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-print-int.mlir index 84debe4c8eeb..85634a43f601 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-print-int.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-print-int.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32-reassoc.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32-reassoc.mlir index debdc83309f0..2b561989691e 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32-reassoc.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32-reassoc.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -convert-scf-to-cf \ // RUN: -convert-vector-to-llvm='reassociate-fp-reductions' \ -// RUN: -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32.mlir index 7457b7d85d77..6036c50acb9b 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f32.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64-reassoc.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64-reassoc.mlir index 50a089dedbd3..6944bc938514 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64-reassoc.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64-reassoc.mlir @@ -1,6 +1,6 @@ // RUN: mlir-opt %s -convert-scf-to-cf \ // RUN: -convert-vector-to-llvm='reassociate-fp-reductions' \ -// RUN: -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64.mlir index 2df65e61b634..605e6867a160 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-f64.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i32.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i32.mlir index c70b7c1b4ba6..0a4a0b104e77 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i32.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i32.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i4.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i4.mlir index c805070c95da..fd6eaee567df 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i4.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i4.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i64.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i64.mlir index c7e1e80f1126..11d815e28d3e 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i64.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-i64.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-si4.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-si4.mlir index bb58173d2e2c..11966c7001ed 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-si4.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-si4.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-ui4.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-ui4.mlir index 913723fc5b08..11be224d8511 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-ui4.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-reductions-ui4.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-scan.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-scan.mlir index b3cd2aed2933..4e4e52513e83 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-scan.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-scan.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -test-vector-scan-lowering -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -test-vector-scan-lowering -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-scatter.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-scatter.mlir index e013be760f6a..af9e38d4ddd8 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-scatter.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-scatter.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-shape-cast.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-shape-cast.mlir index 58cae1c89997..0cc78e53b0cb 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-shape-cast.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-shape-cast.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-shuffle.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-shuffle.mlir index c8a748870aa5..bc346916d73a 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-shuffle.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-shuffle.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-dot-matvec.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-dot-matvec.mlir index cdc21f497683..2ed3201f874f 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-dot-matvec.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-dot-matvec.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-saxpy-jagged-matvec.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-saxpy-jagged-matvec.mlir index d21a7b5c27ed..0c2ae46d1670 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-saxpy-jagged-matvec.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-sparse-saxpy-jagged-matvec.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir index a69393245aea..262ab4cce7d1 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir @@ -1,19 +1,19 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir index 1d0f63a0c57b..ada605de806a 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir @@ -1,19 +1,19 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir index 515e72b7dc00..3bc59e247778 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir @@ -1,19 +1,19 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf='full-unroll=true lower-permutation-maps=true' -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read.mlir index 7b4141def89a..6ad315f99263 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read.mlir @@ -1,9 +1,9 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf=full-unroll=true -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf=full-unroll=true -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir index 18d08ecb6bee..87dfe2736d56 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir @@ -1,9 +1,9 @@ -// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s -// RUN: mlir-opt %s -convert-vector-to-scf=full-unroll=true -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-vector-to-scf=full-unroll=true -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext,%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir index 14b9f7aa4286..d3cd32cba2dc 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-transpose.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-transpose.mlir index 5b660960d227..c5e0d8ca57f3 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-transpose.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-transpose.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-vector-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e entry -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/Dialect/Vector/CPU/test-vector-distribute.mlir b/mlir/test/Integration/Dialect/Vector/CPU/test-vector-distribute.mlir index 5f9c6d2a643e..d63814791172 100644 --- a/mlir/test/Integration/Dialect/Vector/CPU/test-vector-distribute.mlir +++ b/mlir/test/Integration/Dialect/Vector/CPU/test-vector-distribute.mlir @@ -1,11 +1,11 @@ // RUN: mlir-opt %s -test-vector-to-forloop -convert-vector-to-scf \ -// RUN: -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | \ +// RUN: -lower-affine -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext | \ // RUN: FileCheck %s // RUN: mlir-opt %s -convert-vector-to-scf -lower-affine \ -// RUN: -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e main \ +// RUN: -convert-scf-to-cf -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e main \ // RUN: -entry-point-result=void \ // RUN: -shared-libs=%mlir_integration_test_dir/libmlir_runner_utils%shlibext | \ // RUN: FileCheck %s diff --git a/mlir/test/Integration/GPU/CUDA/async.mlir b/mlir/test/Integration/GPU/CUDA/async.mlir index 904ff5db0ab7..407d7802f477 100644 --- a/mlir/test/Integration/GPU/CUDA/async.mlir +++ b/mlir/test/Integration/GPU/CUDA/async.mlir @@ -3,7 +3,7 @@ // RUN: -pass-pipeline='gpu.module(strip-debuginfo,convert-gpu-to-nvvm,gpu-to-cubin)' \ // RUN: -gpu-async-region -gpu-to-llvm \ // RUN: -async-to-async-runtime -async-runtime-ref-counting \ -// RUN: -convert-async-to-llvm -convert-std-to-llvm \ +// RUN: -convert-async-to-llvm -convert-func-to-llvm \ // RUN: | mlir-cpu-runner \ // RUN: --shared-libs=%linalg_test_lib_dir/libmlir_cuda_runtime%shlibext \ // RUN: --shared-libs=%linalg_test_lib_dir/libmlir_async_runtime%shlibext \ diff --git a/mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir b/mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir index abd8f03d819c..04ff73c479e4 100644 --- a/mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir +++ b/mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-vector-to-llvm -convert-arith-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-translate -mlir-to-llvmir | FileCheck %s +// RUN: mlir-opt %s -convert-vector-to-llvm -convert-arith-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-translate -mlir-to-llvmir | FileCheck %s func @genbool_1d() -> vector<8xi1> { %0 = vector.constant_mask [4] : vector<8xi1> diff --git a/mlir/test/lib/Conversion/CMakeLists.txt b/mlir/test/lib/Conversion/CMakeLists.txt index d645b5a18aba..bc6103dedd49 100644 --- a/mlir/test/lib/Conversion/CMakeLists.txt +++ b/mlir/test/lib/Conversion/CMakeLists.txt @@ -1 +1 @@ -add_subdirectory(StandardToLLVM) +add_subdirectory(FuncToLLVM) diff --git a/mlir/test/lib/Conversion/StandardToLLVM/CMakeLists.txt b/mlir/test/lib/Conversion/FuncToLLVM/CMakeLists.txt similarity index 73% rename from mlir/test/lib/Conversion/StandardToLLVM/CMakeLists.txt rename to mlir/test/lib/Conversion/FuncToLLVM/CMakeLists.txt index 5d50d479b555..bda478a6a951 100644 --- a/mlir/test/lib/Conversion/StandardToLLVM/CMakeLists.txt +++ b/mlir/test/lib/Conversion/FuncToLLVM/CMakeLists.txt @@ -1,19 +1,19 @@ # Exclude tests from libMLIR.so -add_mlir_library(MLIRTestStandardToLLVM +add_mlir_library(MLIRTestFuncToLLVM TestConvertCallOp.cpp EXCLUDE_FROM_LIBMLIR LINK_LIBS PUBLIC + MLIRFuncToLLVM MLIRLLVMCommonConversion MLIRLLVMIR MLIRLLVMIRTransforms MLIRPass - MLIRStandardToLLVM MLIRTestDialect ) -target_include_directories(MLIRTestStandardToLLVM +target_include_directories(MLIRTestFuncToLLVM PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../Dialect/Test ${CMAKE_CURRENT_BINARY_DIR}/../../Dialect/Test diff --git a/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp b/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp similarity index 92% rename from mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp rename to mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp index 996967845666..ddfe7971a100 100644 --- a/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp +++ b/mlir/test/lib/Conversion/FuncToLLVM/TestConvertCallOp.cpp @@ -1,4 +1,4 @@ -//===- TestConvertCallOp.cpp - Test LLVM Conversion of Standard CallOp ----===// +//===- TestConvertCallOp.cpp - Test LLVM Conversion of Func CallOp --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -8,8 +8,8 @@ #include "TestDialect.h" #include "TestTypes.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h" #include "mlir/Conversion/LLVMCommon/Pattern.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h" #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/Pass/Pass.h" @@ -58,7 +58,7 @@ public: // Populate patterns. RewritePatternSet patterns(m.getContext()); - populateStdToLLVMConversionPatterns(typeConverter, patterns); + populateFuncToLLVMConversionPatterns(typeConverter, patterns); patterns.add(typeConverter); // Set target. diff --git a/mlir/test/mlir-cpu-runner/X86Vector/math-polynomial-approx-avx2.mlir b/mlir/test/mlir-cpu-runner/X86Vector/math-polynomial-approx-avx2.mlir index ce7a6550dbec..4dc5a4b82506 100644 --- a/mlir/test/mlir-cpu-runner/X86Vector/math-polynomial-approx-avx2.mlir +++ b/mlir/test/mlir-cpu-runner/X86Vector/math-polynomial-approx-avx2.mlir @@ -2,7 +2,7 @@ // RUN: -convert-arith-to-llvm \ // RUN: -convert-vector-to-llvm="enable-x86vector" \ // RUN: -convert-math-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/async-error.mlir b/mlir/test/mlir-cpu-runner/async-error.mlir index 465af45859b0..7b961c089a38 100644 --- a/mlir/test/mlir-cpu-runner/async-error.mlir +++ b/mlir/test/mlir-cpu-runner/async-error.mlir @@ -7,7 +7,7 @@ // RUN: -convert-linalg-to-llvm \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-arith-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/async-group.mlir b/mlir/test/mlir-cpu-runner/async-group.mlir index e322720d3362..b55241cd6e61 100644 --- a/mlir/test/mlir-cpu-runner/async-group.mlir +++ b/mlir/test/mlir-cpu-runner/async-group.mlir @@ -3,7 +3,7 @@ // RUN: -async-runtime-ref-counting-opt \ // RUN: -convert-async-to-llvm \ // RUN: -convert-arith-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/async-value.mlir b/mlir/test/mlir-cpu-runner/async-value.mlir index d7dd3b3a873c..02f209491a24 100644 --- a/mlir/test/mlir-cpu-runner/async-value.mlir +++ b/mlir/test/mlir-cpu-runner/async-value.mlir @@ -5,7 +5,7 @@ // RUN: -convert-arith-to-llvm \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/async.mlir b/mlir/test/mlir-cpu-runner/async.mlir index c5fc875084ff..675a8de6e21c 100644 --- a/mlir/test/mlir-cpu-runner/async.mlir +++ b/mlir/test/mlir-cpu-runner/async.mlir @@ -7,7 +7,7 @@ // RUN: -convert-linalg-to-llvm \ // RUN: -convert-memref-to-llvm \ // RUN: -convert-arith-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir b/mlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir index 4e43350f396d..008123be5f3c 100644 --- a/mlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir +++ b/mlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-arith-to-llvm -convert-memref-to-llvm -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -reconcile-unrealized-casts | mlir-cpu-runner -shared-libs=%linalg_test_lib_dir/libmlir_c_runner_utils%shlibext -entry-point-result=void | FileCheck %s +// RUN: mlir-opt %s -convert-scf-to-cf -convert-arith-to-llvm -convert-memref-to-llvm -convert-func-to-llvm='use-bare-ptr-memref-call-conv=1' -reconcile-unrealized-casts | mlir-cpu-runner -shared-libs=%linalg_test_lib_dir/libmlir_c_runner_utils%shlibext -entry-point-result=void | FileCheck %s // Verify bare pointer memref calling convention. `simple_add1_add2_test` // gets two 2xf32 memrefs, adds 1.0f to the first one and 2.0f to the second diff --git a/mlir/test/mlir-cpu-runner/copy.mlir b/mlir/test/mlir-cpu-runner/copy.mlir index fcf8bcc1eb72..e6f43eee8cc0 100644 --- a/mlir/test/mlir-cpu-runner/copy.mlir +++ b/mlir/test/mlir-cpu-runner/copy.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-arith-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-arith-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/mlir-cpu-runner/global-memref.mlir b/mlir/test/mlir-cpu-runner/global-memref.mlir index b86347f10760..6fcc3f353696 100644 --- a/mlir/test/mlir-cpu-runner/global-memref.mlir +++ b/mlir/test/mlir-cpu-runner/global-memref.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-arith-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext | FileCheck %s +// RUN: mlir-opt %s -convert-arith-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext | FileCheck %s func private @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } func private @print_memref_i32(memref<*xi32>) attributes { llvm.emit_c_interface } diff --git a/mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir b/mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir index ccbd15b8972c..92b417bb7147 100644 --- a/mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir +++ b/mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir @@ -2,7 +2,7 @@ // RUN: -convert-arith-to-llvm \ // RUN: -convert-vector-to-llvm \ // RUN: -convert-math-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner \ // RUN: -e main -entry-point-result=void -O0 \ diff --git a/mlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir b/mlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir index 138724fc92bd..1350443c74e8 100644 --- a/mlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir +++ b/mlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -convert-memref-to-llvm -convert-arith-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts \ +// RUN: mlir-opt %s -convert-scf-to-cf -convert-memref-to-llvm -convert-arith-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/mlir-cpu-runner/memref-reshape.mlir b/mlir/test/mlir-cpu-runner/memref-reshape.mlir index 4ceb55654c77..692a96b19127 100644 --- a/mlir/test/mlir-cpu-runner/memref-reshape.mlir +++ b/mlir/test/mlir-cpu-runner/memref-reshape.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -convert-scf-to-cf -memref-expand -convert-arith-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts \ +// RUN: mlir-opt %s -convert-scf-to-cf -memref-expand -convert-arith-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts \ // RUN: | mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext \ // RUN: | FileCheck %s diff --git a/mlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir b/mlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir index fbfa0cde032c..455fb99b7a2c 100644 --- a/mlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir +++ b/mlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt -convert-linalg-to-loops -lower-affine -convert-scf-to-cf -convert-arith-to-llvm -convert-vector-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts %s | mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext | FileCheck %s +// RUN: mlir-opt -convert-linalg-to-loops -lower-affine -convert-scf-to-cf -convert-arith-to-llvm -convert-vector-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts %s | mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext | FileCheck %s func @main() { %A = memref.alloc() : memref<16x16xf32> diff --git a/mlir/test/mlir-cpu-runner/unranked-memref.mlir b/mlir/test/mlir-cpu-runner/unranked-memref.mlir index 5fc24d0f5125..1ceffd22fff1 100644 --- a/mlir/test/mlir-cpu-runner/unranked-memref.mlir +++ b/mlir/test/mlir-cpu-runner/unranked-memref.mlir @@ -3,7 +3,7 @@ // RUN: -convert-arith-to-llvm \ // RUN: -convert-linalg-to-llvm \ // RUN: -convert-memref-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts | \ // RUN: mlir-cpu-runner -e main -entry-point-result=void \ // RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext,%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext | FileCheck %s diff --git a/mlir/test/mlir-cpu-runner/utils.mlir b/mlir/test/mlir-cpu-runner/utils.mlir index baf5ea52e798..5d39db9d198b 100644 --- a/mlir/test/mlir-cpu-runner/utils.mlir +++ b/mlir/test/mlir-cpu-runner/utils.mlir @@ -1,7 +1,7 @@ -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_0d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-0D -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_1d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-1D -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_3d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-3D -// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-std-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e vector_splat_2d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-VECTOR-SPLAT-2D +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_0d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-0D +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_1d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-1D +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e print_3d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-3D +// RUN: mlir-opt %s -convert-linalg-to-loops -convert-scf-to-cf -convert-arith-to-llvm -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -e vector_splat_2d -entry-point-result=void -shared-libs=%linalg_test_lib_dir/libmlir_runner_utils%shlibext | FileCheck %s --check-prefix=PRINT-VECTOR-SPLAT-2D func @print_0d() { %f = arith.constant 2.00000e+00 : f32 diff --git a/mlir/test/mlir-opt/async.mlir b/mlir/test/mlir-opt/async.mlir index f7dafeacd025..e77cb8339ce2 100644 --- a/mlir/test/mlir-opt/async.mlir +++ b/mlir/test/mlir-opt/async.mlir @@ -9,7 +9,7 @@ // RUN: -convert-linalg-to-llvm \ // RUN: -convert-memref-to-llvm \ // RUN: -convert-arith-to-llvm \ -// RUN: -convert-std-to-llvm \ +// RUN: -convert-func-to-llvm \ // RUN: -reconcile-unrealized-casts \ // RUN: | FileCheck %s diff --git a/mlir/test/python/execution_engine.py b/mlir/test/python/execution_engine.py index 7e1fe9ab9f61..67128444e017 100644 --- a/mlir/test/python/execution_engine.py +++ b/mlir/test/python/execution_engine.py @@ -64,7 +64,7 @@ run(testInvalidModule) def lowerToLLVM(module): import mlir.conversions pm = PassManager.parse( - "convert-memref-to-llvm,convert-std-to-llvm,reconcile-unrealized-casts") + "convert-memref-to-llvm,convert-func-to-llvm,reconcile-unrealized-casts") pm.run(module) return module diff --git a/mlir/test/python/integration/dialects/linalg/opsrun.py b/mlir/test/python/integration/dialects/linalg/opsrun.py index 54e1c85b2956..458780dc0eef 100644 --- a/mlir/test/python/integration/dialects/linalg/opsrun.py +++ b/mlir/test/python/integration/dialects/linalg/opsrun.py @@ -198,7 +198,7 @@ def transform(module, boilerplate): pm = PassManager.parse( "builtin.func(convert-linalg-to-loops, lower-affine, " + "convert-math-to-llvm, convert-scf-to-cf, arith-expand, memref-expand), " - + "convert-vector-to-llvm, convert-memref-to-llvm, convert-std-to-llvm," + + + "convert-vector-to-llvm, convert-memref-to-llvm, convert-func-to-llvm," + "reconcile-unrealized-casts") pm.run(mod) return mod diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt index 34cf3a97d85d..ad98114fcde2 100644 --- a/mlir/tools/mlir-opt/CMakeLists.txt +++ b/mlir/tools/mlir-opt/CMakeLists.txt @@ -12,7 +12,7 @@ set(LLVM_LINK_COMPONENTS if(MLIR_INCLUDE_TESTS) set(test_libs - MLIRTestStandardToLLVM + MLIRTestFuncToLLVM MLIRAffineTransformsTestPasses MLIRDLTITestPasses MLIRFuncTestPasses diff --git a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp index 213e46075a47..ee2c4be2574b 100644 --- a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp +++ b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp @@ -12,9 +12,9 @@ // //===----------------------------------------------------------------------===// +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/GPUToSPIRV/GPUToSPIRVPass.h" #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Dialect/GPU/GPUDialect.h" diff --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp index 59fe4f18b431..972292954663 100644 --- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp +++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp @@ -12,13 +12,13 @@ // //===----------------------------------------------------------------------===// +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/FuncToSPIRV/FuncToSPIRVPass.h" #include "mlir/Conversion/GPUToSPIRV/GPUToSPIRVPass.h" #include "mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h" #include "mlir/Conversion/LLVMCommon/LoweringOptions.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" #include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Dialect/GPU/GPUDialect.h" @@ -54,7 +54,7 @@ static LogicalResult runMLIRPasses(ModuleOp module) { LowerToLLVMOptions llvmOptions(module.getContext(), DataLayout(module)); llvmOptions.emitCWrappers = true; passManager.addPass(createMemRefToLLVMPass()); - passManager.addPass(createLowerToLLVMPass(llvmOptions)); + passManager.addPass(createConvertFuncToLLVMPass(llvmOptions)); passManager.addPass(createReconcileUnrealizedCastsPass()); passManager.addPass(createConvertVulkanLaunchFuncToVulkanCallsPass()); return passManager.run(module); diff --git a/mlir/unittests/ExecutionEngine/Invoke.cpp b/mlir/unittests/ExecutionEngine/Invoke.cpp index 24e287b6e1e0..5fbe5818925b 100644 --- a/mlir/unittests/ExecutionEngine/Invoke.cpp +++ b/mlir/unittests/ExecutionEngine/Invoke.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" +#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h" #include "mlir/Conversion/LinalgToLLVM/LinalgToLLVM.h" #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h" #include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h" -#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h" #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h" #include "mlir/Conversion/VectorToSCF/VectorToSCF.h" #include "mlir/Dialect/Linalg/Passes.h" @@ -47,7 +47,7 @@ static LogicalResult lowerToLLVMDialect(ModuleOp module) { PassManager pm(module.getContext()); pm.addPass(mlir::createMemRefToLLVMPass()); pm.addNestedPass(mlir::arith::createConvertArithmeticToLLVMPass()); - pm.addPass(mlir::createLowerToLLVMPass()); + pm.addPass(mlir::createConvertFuncToLLVMPass()); pm.addPass(mlir::createReconcileUnrealizedCastsPass()); return pm.run(module); }