[flang-commits] [flang] 4ead2cf - [mlir] Rename conversions involving ex-Loop dialect to mention SCF
Alex Zinenko via flang-commits
flang-commits at lists.llvm.org
Fri May 15 01:45:19 PDT 2020
Author: Alex Zinenko
Date: 2020-05-15T10:45:11+02:00
New Revision: 4ead2cf76c4a1df260e7dff0fa767074bae6e2b8
URL: https://github.com/llvm/llvm-project/commit/4ead2cf76c4a1df260e7dff0fa767074bae6e2b8
DIFF: https://github.com/llvm/llvm-project/commit/4ead2cf76c4a1df260e7dff0fa767074bae6e2b8.diff
LOG: [mlir] Rename conversions involving ex-Loop dialect to mention SCF
The following Conversions are affected: LoopToStandard -> SCFToStandard,
LoopsToGPU -> SCFToGPU, VectorToLoops -> VectorToSCF. Full file paths are
affected. Additionally, drop the 'Convert' prefix from filenames living under
lib/Conversion where applicable.
API names and CLI options for pass testing are also renamed when applicable. In
particular, LoopsToGPU contains several passes that apply to different kinds of
loops (`for` or `parallel`), for which the original names are preserved.
Differential Revision: https://reviews.llvm.org/D79940
Added:
mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
mlir/include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h
mlir/include/mlir/Conversion/SCFToStandard/SCFToStandard.h
mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
mlir/lib/Conversion/SCFToStandard/CMakeLists.txt
mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
mlir/lib/Conversion/VectorToSCF/CMakeLists.txt
mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
mlir/test/lib/Transforms/TestVectorToSCFConversion.cpp
Modified:
flang/tools/tco/CMakeLists.txt
mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
mlir/include/mlir/Dialect/Vector/VectorTransforms.h
mlir/include/mlir/InitAllPasses.h
mlir/lib/Conversion/CMakeLists.txt
mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir
mlir/test/Conversion/LoopsToGPU/step_one.mlir
mlir/test/Conversion/LoopsToGPU/step_positive.mlir
mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
mlir/test/Conversion/convert-to-cfg.mlir
mlir/test/lib/Transforms/CMakeLists.txt
mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp
mlir/test/mlir-cpu-runner/bare_ptr_call_conv.mlir
mlir/test/mlir-cpu-runner/sgemm_naive_codegen.mlir
mlir/tools/mlir-opt/mlir-opt.cpp
Removed:
mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
################################################################################
diff --git a/flang/tools/tco/CMakeLists.txt b/flang/tools/tco/CMakeLists.txt
index 451952ba5a3b..f893af2af51b 100644
--- a/flang/tools/tco/CMakeLists.txt
+++ b/flang/tools/tco/CMakeLists.txt
@@ -11,7 +11,7 @@ set(LIBS
MLIRTransforms
MLIRAffineToStandard
MLIRAnalysis
- MLIRLoopToStandard
+ MLIRSCFToStandard
MLIREDSC
MLIRParser
MLIRStandardToLLVM
diff --git a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
index 65ba25ee426f..58458ff4e175 100644
--- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
@@ -16,7 +16,7 @@
#include "toy/Passes.h"
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
-#include "mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h"
+#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
diff --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
index 65ba25ee426f..58458ff4e175 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
@@ -16,7 +16,7 @@
#include "toy/Passes.h"
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
-#include "mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h"
+#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index f0724b2d1677..ea4ea845a5a4 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -161,22 +161,22 @@ def ConvertLinalgToSPIRV : Pass<"convert-linalg-to-spirv", "ModuleOp"> {
}
//===----------------------------------------------------------------------===//
-// LoopToStandard
+// SCFToStandard
//===----------------------------------------------------------------------===//
-def ConvertLoopToStandard : Pass<"convert-loop-to-std"> {
+def SCFToStandard : Pass<"convert-scf-to-std"> {
let summary = "Convert SCF dialect to Standard dialect, replacing structured"
" control flow with a CFG";
let constructor = "mlir::createLowerToCFGPass()";
}
//===----------------------------------------------------------------------===//
-// LoopsToGPU
+// SCFToGPU
//===----------------------------------------------------------------------===//
-def ConvertSimpleLoopsToGPU : FunctionPass<"convert-loops-to-gpu"> {
+def ConvertSimpleSCFToGPU : FunctionPass<"convert-scf-to-gpu"> {
let summary = "Convert top-level loops to GPU kernels";
- let constructor = "mlir::createSimpleLoopsToGPUPass()";
+ let constructor = "mlir::createSimpleSCFToGPUPass()";
let options = [
Option<"numBlockDims", "gpu-block-dims", "unsigned", /*default=*/"1u",
"Number of GPU block dimensions for mapping">,
@@ -185,7 +185,7 @@ def ConvertSimpleLoopsToGPU : FunctionPass<"convert-loops-to-gpu"> {
];
}
-def ConvertLoopsToGPU : FunctionPass<"convert-loop-op-to-gpu"> {
+def ConvertSCFToGPU : FunctionPass<"convert-loop-op-to-gpu"> {
let summary = "Convert top-level scf::ForOp to GPU kernels";
let constructor = "mlir::createLoopToGPUPass()";
let options = [
diff --git a/mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
similarity index 94%
rename from mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
rename to mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
index a3be39b07c15..02e3a02e69c3 100644
--- a/mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPU.h
+++ b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
@@ -1,12 +1,12 @@
-//===- LoopsToGPU.h - Convert loop nests to GPU kernels ---------*- C++ -*-===//
+//===- SCFToGPU.h - Convert loop nests to GPU kernels -----------*- 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_LOOPSTOGPU_LOOPSTOGPU_H_
-#define MLIR_CONVERSION_LOOPSTOGPU_LOOPSTOGPU_H_
+#ifndef MLIR_CONVERSION_SCFTOGPU_SCFTOGPU_H_
+#define MLIR_CONVERSION_SCFTOGPU_SCFTOGPU_H_
#include "mlir/Support/LLVM.h"
@@ -81,4 +81,4 @@ void populateParallelLoopToGPUPatterns(OwningRewritePatternList &patterns,
} // namespace mlir
-#endif // MLIR_CONVERSION_LOOPSTOGPU_LOOPSTOGPU_H_
+#endif // MLIR_CONVERSION_SCFTOGPU_SCFTOGPU_H_
diff --git a/mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h
similarity index 89%
rename from mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
rename to mlir/include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h
index 5e56bc876fcf..930380e5e69c 100644
--- a/mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
+++ b/mlir/include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h
@@ -1,4 +1,4 @@
-//===- LoopsToGPUPass.h - Pass converting loops to GPU kernels --*- C++ -*-===//
+//===- SCFToGPUPass.h - Pass converting loops to GPU kernels ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -14,7 +14,8 @@
namespace mlir {
class FuncOp;
-template <typename T> class OperationPass;
+template <typename T>
+class OperationPass;
class Pass;
/// Create a pass that converts loop nests into GPU kernels. It considers
@@ -26,8 +27,8 @@ class Pass;
/// to strip-mine the loops and to perform the dependence analysis before
/// calling the conversion.
std::unique_ptr<OperationPass<FuncOp>>
-createSimpleLoopsToGPUPass(unsigned numBlockDims, unsigned numThreadDims);
-std::unique_ptr<OperationPass<FuncOp>> createSimpleLoopsToGPUPass();
+createSimpleSCFToGPUPass(unsigned numBlockDims, unsigned numThreadDims);
+std::unique_ptr<OperationPass<FuncOp>> createSimpleSCFToGPUPass();
/// Create a pass that converts every loop operation within the body of the
/// FuncOp into a GPU launch. The number of workgroups and workgroup size for
diff --git a/mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h b/mlir/include/mlir/Conversion/SCFToStandard/SCFToStandard.h
similarity index 79%
rename from mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
rename to mlir/include/mlir/Conversion/SCFToStandard/SCFToStandard.h
index 5e6d674922e8..fd85a3d367e7 100644
--- a/mlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
+++ b/mlir/include/mlir/Conversion/SCFToStandard/SCFToStandard.h
@@ -1,4 +1,4 @@
-//===- ConvertLoopToStandard.h - Pass entrypoint ----------------*- C++ -*-===//
+//===- ConvertSCFToStandard.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.
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef MLIR_CONVERSION_LOOPTOSTANDARD_CONVERTLOOPTOSTANDARD_H_
-#define MLIR_CONVERSION_LOOPTOSTANDARD_CONVERTLOOPTOSTANDARD_H_
+#ifndef MLIR_CONVERSION_SCFTOSTANDARD_SCFTOSTANDARD_H_
+#define MLIR_CONVERSION_SCFTOSTANDARD_SCFTOSTANDARD_H_
#include <memory>
#include <vector>
@@ -32,4 +32,4 @@ std::unique_ptr<Pass> createLowerToCFGPass();
} // namespace mlir
-#endif // MLIR_CONVERSION_LOOPTOSTANDARD_CONVERTLOOPTOSTANDARD_H_
+#endif // MLIR_CONVERSION_SCFTOSTANDARD_SCFTOSTANDARD_H_
diff --git a/mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
similarity index 52%
rename from mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
rename to mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
index 61d4de77458f..976751e48cb1 100644
--- a/mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
+++ b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
@@ -1,4 +1,4 @@
-//===- ConvertVectorToLoops.h - Utils to convert from the vector dialect --===//
+//===- VectorToSCF.h - Utils to convert from the vector dialect -*- 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,17 +6,17 @@
//
//===----------------------------------------------------------------------===//
-#ifndef MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLOOPS_H_
-#define MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLOOPS_H_
+#ifndef MLIR_CONVERSION_VECTORTOSCF_VECTORTOSCF_H_
+#define MLIR_CONVERSION_VECTORTOSCF_VECTORTOSCF_H_
namespace mlir {
class MLIRContext;
class OwningRewritePatternList;
/// Collect a set of patterns to convert from the Vector dialect to loops + std.
-void populateVectorToLoopsConversionPatterns(OwningRewritePatternList &patterns,
- MLIRContext *context);
+void populateVectorToSCFConversionPatterns(OwningRewritePatternList &patterns,
+ MLIRContext *context);
} // namespace mlir
-#endif // MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLOOPS_H_
+#endif // MLIR_CONVERSION_VECTORTOSCF_VECTORTOSCF_H_
diff --git a/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h b/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
index 8dd7c7f61212..842734d256d3 100644
--- a/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
+++ b/mlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
@@ -63,7 +63,7 @@ LogicalResult setMappingAttr(scf::ParallelOp ploopOp,
/// encountered to the local workgroup. Within each mapping, the first three
/// dimensions are mapped to x/y/z hardware ids and all following dimensions are
/// mapped to sequential loops.
-void greedilyMapParallelLoopsToGPU(Region ®ion);
+void greedilyMapParallelSCFToGPU(Region ®ion);
} // end namespace mlir
#endif // MLIR_DIALECT_GPU_PARALLELLOOPMAPPER_H
diff --git a/mlir/include/mlir/Dialect/Vector/VectorTransforms.h b/mlir/include/mlir/Dialect/Vector/VectorTransforms.h
index d2858b8d5c20..a7325ce838cb 100644
--- a/mlir/include/mlir/Dialect/Vector/VectorTransforms.h
+++ b/mlir/include/mlir/Dialect/Vector/VectorTransforms.h
@@ -16,7 +16,7 @@ class MLIRContext;
class OwningRewritePatternList;
/// Collect a set of patterns to convert from the Vector dialect to itself.
-/// Should be merged with populateVectorToLoopsLoweringPattern.
+/// Should be merged with populateVectorToSCFLoweringPattern.
void populateVectorToVectorConversionPatterns(
MLIRContext *context, OwningRewritePatternList &patterns,
ArrayRef<int64_t> coarseVectorShape = {},
diff --git a/mlir/include/mlir/InitAllPasses.h b/mlir/include/mlir/InitAllPasses.h
index 26c11621e0ac..5b5f72f9d82b 100644
--- a/mlir/include/mlir/InitAllPasses.h
+++ b/mlir/include/mlir/InitAllPasses.h
@@ -23,8 +23,8 @@
#include "mlir/Conversion/LinalgToLLVM/LinalgToLLVM.h"
#include "mlir/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.h"
#include "mlir/Conversion/LinalgToStandard/LinalgToStandard.h"
-#include "mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h"
-#include "mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h"
+#include "mlir/Conversion/SCFToGPU/SCFToGPUPass.h"
+#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h"
#include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
diff --git a/mlir/lib/Conversion/CMakeLists.txt b/mlir/lib/Conversion/CMakeLists.txt
index 3ac3b11b8298..d78fb8920516 100644
--- a/mlir/lib/Conversion/CMakeLists.txt
+++ b/mlir/lib/Conversion/CMakeLists.txt
@@ -8,9 +8,9 @@ add_subdirectory(GPUToVulkan)
add_subdirectory(LinalgToLLVM)
add_subdirectory(LinalgToSPIRV)
add_subdirectory(LinalgToStandard)
-add_subdirectory(LoopsToGPU)
-add_subdirectory(LoopToStandard)
+add_subdirectory(SCFToGPU)
+add_subdirectory(SCFToStandard)
add_subdirectory(StandardToLLVM)
add_subdirectory(StandardToSPIRV)
add_subdirectory(VectorToLLVM)
-add_subdirectory(VectorToLoops)
+add_subdirectory(VectorToSCF)
diff --git a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
index 45b60c7ecd86..d507b413fbec 100644
--- a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
@@ -17,9 +17,9 @@ add_mlir_conversion_library(MLIRLinalgToLLVM
MLIRIR
MLIRLinalgOps
MLIRLLVMIR
- MLIRLoopToStandard
+ MLIRSCFToStandard
MLIRStandardToLLVM
- MLIRVectorToLLVM
- MLIRVectorToLoops
MLIRTransforms
+ MLIRVectorToLLVM
+ MLIRVectorToSCF
)
diff --git a/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp b/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
index 68ac974b5e96..6dbe563e01aa 100644
--- a/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
+++ b/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
@@ -10,11 +10,11 @@
#include "../PassDetail.h"
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
-#include "mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h"
+#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
-#include "mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h"
+#include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/Linalg/IR/LinalgOps.h"
#include "mlir/Dialect/Linalg/IR/LinalgTypes.h"
@@ -377,7 +377,7 @@ void ConvertLinalgToLLVMPass::runOnOperation() {
populateAffineToStdConversionPatterns(patterns, &getContext());
populateLoopToStdConversionPatterns(patterns, &getContext());
populateStdToLLVMConversionPatterns(converter, patterns);
- populateVectorToLoopsConversionPatterns(patterns, &getContext());
+ populateVectorToSCFConversionPatterns(patterns, &getContext());
populateVectorToLLVMMatrixConversionPatterns(converter, patterns);
populateVectorToLLVMConversionPatterns(converter, patterns);
populateLinalgToLLVMConversionPatterns(converter, patterns, &getContext());
diff --git a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
similarity index 62%
rename from mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
rename to mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
index 9b4e184d84c3..1da4dacd190e 100644
--- a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
@@ -1,9 +1,9 @@
-add_mlir_conversion_library(MLIRLoopsToGPU
- LoopsToGPU.cpp
- LoopsToGPUPass.cpp
+add_mlir_conversion_library(MLIRSCFToGPU
+ SCFToGPU.cpp
+ SCFToGPUPass.cpp
ADDITIONAL_HEADER_DIRS
- ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
+ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/SCFToGPU
DEPENDS
MLIRConversionPassIncGen
diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
similarity index 99%
rename from mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
rename to mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
index 84cbf1bf7dde..034cd1e5f8eb 100644
--- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
@@ -1,4 +1,4 @@
-//===- LoopsToGPU.cpp - Convert an affine loop nest to a GPU kernel -------===//
+//===- SCFToGPU.cpp - Convert an affine loop nest to a GPU kernel -------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "mlir/Conversion/LoopsToGPU/LoopsToGPU.h"
+#include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
similarity index 89%
rename from mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
rename to mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
index 71aefe72783b..e8c4e76c1681 100644
--- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
@@ -1,4 +1,4 @@
-//===- LoopsToGPUPass.cpp - Convert a loop nest to a GPU kernel -----------===//
+//===- SCFToGPUPass.cpp - Convert a loop nest to a GPU kernel -----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,9 +6,9 @@
//
//===----------------------------------------------------------------------===//
-#include "mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h"
+#include "mlir/Conversion/SCFToGPU/SCFToGPUPass.h"
#include "../PassDetail.h"
-#include "mlir/Conversion/LoopsToGPU/LoopsToGPU.h"
+#include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/GPU/GPUDialect.h"
#include "mlir/Dialect/SCF/SCF.h"
@@ -18,7 +18,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/CommandLine.h"
-#define PASS_NAME "convert-loops-to-gpu"
+#define PASS_NAME "convert-scf-to-gpu"
#define LOOPOP_TO_GPU_PASS_NAME "convert-loop-op-to-gpu"
using namespace mlir;
@@ -28,7 +28,7 @@ namespace {
// A pass that traverses top-level loops in the function and converts them to
// GPU launch operations. Nested launches are not allowed, so this does not
// walk the function recursively to avoid considering nested loops.
-struct ForLoopMapper : public ConvertSimpleLoopsToGPUBase<ForLoopMapper> {
+struct ForLoopMapper : public ConvertSimpleSCFToGPUBase<ForLoopMapper> {
ForLoopMapper() = default;
ForLoopMapper(unsigned numBlockDims, unsigned numThreadDims) {
this->numBlockDims = numBlockDims;
@@ -56,7 +56,7 @@ struct ForLoopMapper : public ConvertSimpleLoopsToGPUBase<ForLoopMapper> {
// nested loops as the size of `numWorkGroups`. Within these any loop nest has
// to be perfectly nested upto depth equal to size of `workGroupSize`.
struct ImperfectlyNestedForLoopMapper
- : public ConvertLoopsToGPUBase<ImperfectlyNestedForLoopMapper> {
+ : public ConvertSCFToGPUBase<ImperfectlyNestedForLoopMapper> {
ImperfectlyNestedForLoopMapper() = default;
ImperfectlyNestedForLoopMapper(ArrayRef<int64_t> numWorkGroups,
ArrayRef<int64_t> workGroupSize) {
@@ -108,11 +108,10 @@ struct ParallelLoopToGpuPass
} // namespace
std::unique_ptr<OperationPass<FuncOp>>
-mlir::createSimpleLoopsToGPUPass(unsigned numBlockDims,
- unsigned numThreadDims) {
+mlir::createSimpleSCFToGPUPass(unsigned numBlockDims, unsigned numThreadDims) {
return std::make_unique<ForLoopMapper>(numBlockDims, numThreadDims);
}
-std::unique_ptr<OperationPass<FuncOp>> mlir::createSimpleLoopsToGPUPass() {
+std::unique_ptr<OperationPass<FuncOp>> mlir::createSimpleSCFToGPUPass() {
return std::make_unique<ForLoopMapper>();
}
diff --git a/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt b/mlir/lib/Conversion/SCFToStandard/CMakeLists.txt
similarity index 52%
rename from mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
rename to mlir/lib/Conversion/SCFToStandard/CMakeLists.txt
index 89d8cb9813d8..a9447ea81689 100644
--- a/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToStandard/CMakeLists.txt
@@ -1,8 +1,8 @@
-add_mlir_conversion_library(MLIRLoopToStandard
- LoopToStandard.cpp
+add_mlir_conversion_library(MLIRSCFToStandard
+ SCFToStandard.cpp
ADDITIONAL_HEADER_DIRS
- ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopToStandard
+ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/SCFToStandard
DEPENDS
MLIRConversionPassIncGen
diff --git a/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp b/mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
similarity index 98%
rename from mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
rename to mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
index d064ad24071f..96fdaf3551f1 100644
--- a/mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
+++ b/mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
@@ -1,4 +1,4 @@
-//===- LoopToStandard.cpp - ControlFlow to CFG conversion -----------------===//
+//===- SCFToStandard.cpp - ControlFlow to CFG conversion ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "mlir/Conversion/SCFToStandard/SCFToStandard.h"
#include "../PassDetail.h"
-#include "mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/BlockAndValueMapping.h"
@@ -29,8 +29,7 @@ using namespace mlir::scf;
namespace {
-struct LoopToStandardPass
- : public ConvertLoopToStandardBase<LoopToStandardPass> {
+struct SCFToStandardPass : public SCFToStandardBase<SCFToStandardPass> {
void runOnOperation() override;
};
@@ -405,7 +404,7 @@ void mlir::populateLoopToStdConversionPatterns(
patterns.insert<ForLowering, IfLowering, ParallelLowering>(ctx);
}
-void LoopToStandardPass::runOnOperation() {
+void SCFToStandardPass::runOnOperation() {
OwningRewritePatternList patterns;
populateLoopToStdConversionPatterns(patterns, &getContext());
ConversionTarget target(getContext());
@@ -415,5 +414,5 @@ void LoopToStandardPass::runOnOperation() {
}
std::unique_ptr<Pass> mlir::createLowerToCFGPass() {
- return std::make_unique<LoopToStandardPass>();
+ return std::make_unique<SCFToStandardPass>();
}
diff --git a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt b/mlir/lib/Conversion/VectorToSCF/CMakeLists.txt
similarity index 50%
rename from mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
rename to mlir/lib/Conversion/VectorToSCF/CMakeLists.txt
index 08cbc392d7f6..d6bc8dabf3a9 100644
--- a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToSCF/CMakeLists.txt
@@ -1,8 +1,8 @@
-add_mlir_conversion_library(MLIRVectorToLoops
- ConvertVectorToLoops.cpp
+add_mlir_conversion_library(MLIRVectorToSCF
+ VectorToSCF.cpp
ADDITIONAL_HEADER_DIRS
- ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLoops
+ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToSCF
LINK_COMPONENTS
Core
diff --git a/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
similarity index 99%
rename from mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
rename to mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
index ad573559cb28..c9cd605afb84 100644
--- a/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
+++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
@@ -1,4 +1,4 @@
-//===- VectorToLoops.cpp - Conversion from Vector to mix of Loops and Std -===//
+//===- VectorToSCF.cpp - Conversion from Vector to mix of SCF and Std -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -12,7 +12,7 @@
#include <type_traits>
-#include "mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h"
+#include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
#include "mlir/Dialect/Affine/EDSC/Intrinsics.h"
#include "mlir/Dialect/SCF/EDSC/Builders.h"
#include "mlir/Dialect/SCF/EDSC/Intrinsics.h"
@@ -583,7 +583,7 @@ LogicalResult VectorTransferRewriter<TransferWriteOp>::matchAndRewrite(
} // namespace
-void mlir::populateVectorToLoopsConversionPatterns(
+void mlir::populateVectorToSCFConversionPatterns(
OwningRewritePatternList &patterns, MLIRContext *context) {
patterns.insert<VectorTransferRewriter<vector::TransferReadOp>,
VectorTransferRewriter<vector::TransferWriteOp>>(context);
diff --git a/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp b/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
index bf079f7efb45..85609aa9f052 100644
--- a/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
@@ -146,6 +146,6 @@ static void mapParallelOp(ParallelOp parallelOp,
}
}
-void mlir::greedilyMapParallelLoopsToGPU(Region ®ion) {
+void mlir::greedilyMapParallelSCFToGPU(Region ®ion) {
region.walk([](ParallelOp parallelOp) { mapParallelOp(parallelOp); });
}
diff --git a/mlir/lib/Dialect/Vector/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
index ef536e2194c1..4f8e2374a251 100644
--- a/mlir/lib/Dialect/Vector/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/VectorTransforms.cpp
@@ -1,4 +1,4 @@
-//===- VectorToLoops.cpp - Conversion within the Vector dialect -----------===//
+//===- VectorTransforms.cpp - Conversion within the Vector dialect --------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir b/mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
index 71555fab685b..e1aec40aeea8 100644
--- a/mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
+++ b/mlir/test/Conversion/LoopsToGPU/linalg_to_gpu.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt -convert-loops-to-gpu %s | FileCheck %s
+// RUN: mlir-opt -convert-scf-to-gpu %s | FileCheck %s
// CHECK-LABEL: @foo
func @foo(%arg0: memref<?xf32>, %arg1 : index) {
diff --git a/mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir b/mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir
index 6100a10e704f..8fb9d4166004 100644
--- a/mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir
+++ b/mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir
@@ -1,5 +1,5 @@
-// RUN: mlir-opt -convert-loops-to-gpu="gpu-block-dims=0 gpu-thread-dims=1" %s | FileCheck --check-prefix=CHECK-THREADS %s --dump-input-on-failure
-// RUN: mlir-opt -convert-loops-to-gpu="gpu-block-dims=1 gpu-thread-dims=0" %s | FileCheck --check-prefix=CHECK-BLOCKS %s --dump-input-on-failure
+// RUN: mlir-opt -convert-scf-to-gpu="gpu-block-dims=0 gpu-thread-dims=1" %s | FileCheck --check-prefix=CHECK-THREADS %s --dump-input-on-failure
+// RUN: mlir-opt -convert-scf-to-gpu="gpu-block-dims=1 gpu-thread-dims=0" %s | FileCheck --check-prefix=CHECK-BLOCKS %s --dump-input-on-failure
// CHECK-THREADS-LABEL: @one_d_loop
// CHECK-BLOCKS-LABEL: @one_d_loop
diff --git a/mlir/test/Conversion/LoopsToGPU/step_one.mlir b/mlir/test/Conversion/LoopsToGPU/step_one.mlir
index d5fc395871e6..cd8ec0d8816f 100644
--- a/mlir/test/Conversion/LoopsToGPU/step_one.mlir
+++ b/mlir/test/Conversion/LoopsToGPU/step_one.mlir
@@ -1,5 +1,5 @@
-// RUN: mlir-opt -convert-loops-to-gpu="gpu-block-dims=1 gpu-thread-dims=1" %s | FileCheck --check-prefix=CHECK-11 %s
-// RUN: mlir-opt -convert-loops-to-gpu="gpu-block-dims=2 gpu-thread-dims=2" %s | FileCheck --check-prefix=CHECK-22 %s
+// RUN: mlir-opt -convert-scf-to-gpu="gpu-block-dims=1 gpu-thread-dims=1" %s | FileCheck --check-prefix=CHECK-11 %s
+// RUN: mlir-opt -convert-scf-to-gpu="gpu-block-dims=2 gpu-thread-dims=2" %s | FileCheck --check-prefix=CHECK-22 %s
// CHECK-11-LABEL: @step_1
// CHECK-22-LABEL: @step_1
diff --git a/mlir/test/Conversion/LoopsToGPU/step_positive.mlir b/mlir/test/Conversion/LoopsToGPU/step_positive.mlir
index 9037eace6584..26f2dfac5ef6 100644
--- a/mlir/test/Conversion/LoopsToGPU/step_positive.mlir
+++ b/mlir/test/Conversion/LoopsToGPU/step_positive.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt -convert-loops-to-gpu="gpu-block-dims=1 gpu-thread-dims=1" %s | FileCheck %s
+// RUN: mlir-opt -convert-scf-to-gpu="gpu-block-dims=1 gpu-thread-dims=1" %s | FileCheck %s
// CHECK-LABEL: @step_var
func @step_var(%A : memref<?x?xf32>, %B : memref<?x?xf32>) {
diff --git a/mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir b/mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
index 13796c012991..491196c91efb 100644
--- a/mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
+++ b/mlir/test/Conversion/VectorToLoops/vector-to-loops.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt %s -test-convert-vector-to-loops -split-input-file | FileCheck %s
+// RUN: mlir-opt %s -test-convert-vector-to-scf -split-input-file | FileCheck %s
// CHECK-LABEL: func @materialize_read_1d() {
func @materialize_read_1d() {
diff --git a/mlir/test/Conversion/convert-to-cfg.mlir b/mlir/test/Conversion/convert-to-cfg.mlir
index 5ebfbc409e74..d2dedf91bd51 100644
--- a/mlir/test/Conversion/convert-to-cfg.mlir
+++ b/mlir/test/Conversion/convert-to-cfg.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt -convert-loop-to-std %s | FileCheck %s
+// RUN: mlir-opt -convert-scf-to-std %s | FileCheck %s
// CHECK-LABEL: func @simple_std_for_loop(%{{.*}}: index, %{{.*}}: index, %{{.*}}: index) {
// CHECK-NEXT: br ^bb1(%{{.*}} : index)
diff --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt
index 4d89f06cace7..d040cdf97abb 100644
--- a/mlir/test/lib/Transforms/CMakeLists.txt
+++ b/mlir/test/lib/Transforms/CMakeLists.txt
@@ -19,7 +19,7 @@ add_mlir_library(MLIRTestTransforms
TestMemRefBoundCheck.cpp
TestMemRefDependenceCheck.cpp
TestMemRefStrideCalculation.cpp
- TestVectorToLoopsConversion.cpp
+ TestVectorToSCFConversion.cpp
TestVectorTransforms.cpp
EXCLUDE_FROM_LIBMLIR
@@ -45,7 +45,7 @@ add_mlir_library(MLIRTestTransforms
MLIRStandardOpsTransforms
MLIRTestDialect
MLIRTransformUtils
- MLIRVectorToLoops
+ MLIRVectorToSCF
MLIRVector
)
diff --git a/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp b/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp
index d877001bedd5..916b72037973 100644
--- a/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp
+++ b/mlir/test/lib/Transforms/TestGpuParallelLoopMapping.cpp
@@ -25,7 +25,7 @@ class TestGpuGreedyParallelLoopMappingPass
void runOnOperation() override {
Operation *op = getOperation();
for (Region ®ion : op->getRegions())
- greedilyMapParallelLoopsToGPU(region);
+ greedilyMapParallelSCFToGPU(region);
}
};
} // end namespace
diff --git a/mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp b/mlir/test/lib/Transforms/TestVectorToSCFConversion.cpp
similarity index 64%
rename from mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
rename to mlir/test/lib/Transforms/TestVectorToSCFConversion.cpp
index 907e20084869..fb3010d88b52 100644
--- a/mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
+++ b/mlir/test/lib/Transforms/TestVectorToSCFConversion.cpp
@@ -1,4 +1,4 @@
-//===- TestVectorToLoopsConversion.cpp - Test VectorTransfers lowering ----===//
+//===- TestVectorToSCFConversion.cpp - Test VectorTransfers lowering ------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,7 +8,7 @@
#include <type_traits>
-#include "mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h"
+#include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/Passes.h"
@@ -17,12 +17,12 @@ using namespace mlir;
namespace {
-struct TestVectorToLoopsPass
- : public PassWrapper<TestVectorToLoopsPass, FunctionPass> {
+struct TestVectorToSCFPass
+ : public PassWrapper<TestVectorToSCFPass, FunctionPass> {
void runOnFunction() override {
OwningRewritePatternList patterns;
auto *context = &getContext();
- populateVectorToLoopsConversionPatterns(patterns, context);
+ populateVectorToSCFConversionPatterns(patterns, context);
applyPatternsAndFoldGreedily(getFunction(), patterns);
}
};
@@ -30,9 +30,9 @@ struct TestVectorToLoopsPass
} // end anonymous namespace
namespace mlir {
-void registerTestVectorToLoopsPass() {
- PassRegistration<TestVectorToLoopsPass> pass(
- "test-convert-vector-to-loops",
+void registerTestVectorToSCFPass() {
+ PassRegistration<TestVectorToSCFPass> pass(
+ "test-convert-vector-to-scf",
"Converts vector transfer ops to loops over scalars and vector casts");
}
} // namespace mlir
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 61b98b1c4839..b48b523165bd 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-loop-to-std -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' | 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-std -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' | 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/sgemm_naive_codegen.mlir b/mlir/test/mlir-cpu-runner/sgemm_naive_codegen.mlir
index eadf51d9e2ee..c65a3e3d4b50 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-loop-to-std -convert-std-to-llvm %s | mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext | FileCheck %s
+// RUN: mlir-opt -convert-linalg-to-loops -lower-affine -convert-scf-to-std -convert-std-to-llvm %s | mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext | FileCheck %s
func @main() {
%A = alloc() : memref<64x64xf32>
diff --git a/mlir/tools/mlir-opt/mlir-opt.cpp b/mlir/tools/mlir-opt/mlir-opt.cpp
index 9d583dc2a319..218d6c03b4b8 100644
--- a/mlir/tools/mlir-opt/mlir-opt.cpp
+++ b/mlir/tools/mlir-opt/mlir-opt.cpp
@@ -61,7 +61,7 @@ void registerTestOpaqueLoc();
void registerTestParallelismDetection();
void registerTestGpuParallelLoopMappingPass();
void registerTestVectorConversions();
-void registerTestVectorToLoopsPass();
+void registerTestVectorToSCFPass();
void registerVectorizerTestPass();
} // namespace mlir
@@ -128,7 +128,7 @@ void registerTestPasses() {
registerTestParallelismDetection();
registerTestGpuParallelLoopMappingPass();
registerTestVectorConversions();
- registerTestVectorToLoopsPass();
+ registerTestVectorToSCFPass();
registerVectorizerTestPass();
}
More information about the flang-commits
mailing list