forked from OSchip/llvm-project
[MLIR][NFC] Update SCF pass cmd line names to prefix scf
Update SCF pass cmd line names to prefix `scf`. This is consistent with guidelines/convention on how to name dialect passes. This also avoids ambiguity on the context given the multiple `for` operations in the tree. NFC. Differential Revision: https://reviews.llvm.org/D118564
This commit is contained in:
parent
457273fda5
commit
92ccb8cc50
|
@ -21,15 +21,14 @@ def SCFBufferize : Pass<"scf-bufferize", "FuncOp"> {
|
|||
// Note: Making these canonicalization patterns would require a dependency
|
||||
// of the SCF dialect on the Affine/Tensor/MemRef dialects or vice versa.
|
||||
def SCFForLoopCanonicalization
|
||||
: Pass<"for-loop-canonicalization", "FuncOp"> {
|
||||
: Pass<"scf-for-loop-canonicalization", "FuncOp"> {
|
||||
let summary = "Canonicalize operations within scf.for loop bodies";
|
||||
let constructor = "mlir::createSCFForLoopCanonicalizationPass()";
|
||||
let dependentDialects = ["AffineDialect", "tensor::TensorDialect",
|
||||
"memref::MemRefDialect"];
|
||||
}
|
||||
|
||||
def SCFForLoopPeeling
|
||||
: Pass<"for-loop-peeling", "FuncOp"> {
|
||||
def SCFForLoopPeeling : Pass<"scf-for-loop-peeling", "FuncOp"> {
|
||||
let summary = "Peel `for` loops at their upper bounds.";
|
||||
let constructor = "mlir::createForLoopPeelingPass()";
|
||||
let options = [
|
||||
|
@ -41,18 +40,17 @@ def SCFForLoopPeeling
|
|||
let dependentDialects = ["AffineDialect"];
|
||||
}
|
||||
|
||||
def SCFForLoopSpecialization
|
||||
: Pass<"for-loop-specialization", "FuncOp"> {
|
||||
def SCFForLoopSpecialization : Pass<"scf-for-loop-specialization", "FuncOp"> {
|
||||
let summary = "Specialize `for` loops for vectorization";
|
||||
let constructor = "mlir::createForLoopSpecializationPass()";
|
||||
}
|
||||
|
||||
def SCFParallelLoopFusion : Pass<"parallel-loop-fusion"> {
|
||||
def SCFParallelLoopFusion : Pass<"scf-parallel-loop-fusion"> {
|
||||
let summary = "Fuse adjacent parallel loops";
|
||||
let constructor = "mlir::createParallelLoopFusionPass()";
|
||||
}
|
||||
|
||||
def SCFParallelLoopCollapsing : Pass<"parallel-loop-collapsing"> {
|
||||
def SCFParallelLoopCollapsing : Pass<"scf-parallel-loop-collapsing"> {
|
||||
let summary = "Collapse parallel loops to use less induction variables";
|
||||
let constructor = "mlir::createParallelLoopCollapsingPass()";
|
||||
let options = [
|
||||
|
@ -69,12 +67,12 @@ def SCFParallelLoopCollapsing : Pass<"parallel-loop-collapsing"> {
|
|||
}
|
||||
|
||||
def SCFParallelLoopSpecialization
|
||||
: Pass<"parallel-loop-specialization", "FuncOp"> {
|
||||
: Pass<"scf-parallel-loop-specialization", "FuncOp"> {
|
||||
let summary = "Specialize parallel loops for vectorization";
|
||||
let constructor = "mlir::createParallelLoopSpecializationPass()";
|
||||
}
|
||||
|
||||
def SCFParallelLoopTiling : Pass<"parallel-loop-tiling", "FuncOp"> {
|
||||
def SCFParallelLoopTiling : Pass<"scf-parallel-loop-tiling", "FuncOp"> {
|
||||
let summary = "Tile parallel loops";
|
||||
let constructor = "mlir::createParallelLoopTilingPass()";
|
||||
let options = [
|
||||
|
@ -89,14 +87,12 @@ def SCFParallelLoopTiling : Pass<"parallel-loop-tiling", "FuncOp"> {
|
|||
let dependentDialects = ["AffineDialect"];
|
||||
}
|
||||
|
||||
def SCFForLoopRangeFolding
|
||||
: Pass<"for-loop-range-folding"> {
|
||||
def SCFForLoopRangeFolding : Pass<"scf-for-loop-range-folding"> {
|
||||
let summary = "Fold add/mul ops into loop range";
|
||||
let constructor = "mlir::createForLoopRangeFoldingPass()";
|
||||
}
|
||||
|
||||
def SCFForToWhileLoop
|
||||
: Pass<"scf-for-to-while", "FuncOp"> {
|
||||
def SCFForToWhileLoop : Pass<"scf-for-to-while", "FuncOp"> {
|
||||
let summary = "Convert SCF for loops to SCF while loops";
|
||||
let constructor = "mlir::createForToWhileLoopPass()";
|
||||
let description = [{
|
||||
|
@ -120,7 +116,7 @@ def SCFForToWhileLoop
|
|||
%1 = arith.cmpi slt, %i, %arg1 : index
|
||||
scf.condition(%1) %i : index
|
||||
} do {
|
||||
^bb0(%i: index):
|
||||
^bb0(%i: index):
|
||||
%1 = arith.addi %i, %c1 : index
|
||||
%2 = arith.addi %arg2, %arg2 : i32
|
||||
memref.store %2, %arg0[%i] : memref<?xi32>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -test-linalg-transform-patterns="test-tile-scalarize-dynamic-dims" -for-loop-canonicalization -canonicalize -split-input-file | \
|
||||
// RUN: mlir-opt %s -test-linalg-transform-patterns="test-tile-scalarize-dynamic-dims" -scf-for-loop-canonicalization -canonicalize -split-input-file | \
|
||||
// RUN: FileCheck %s
|
||||
|
||||
// CHECK-LABEL: func @matmul_partly_dynamic_tensor(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -for-loop-canonicalization -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -scf-for-loop-canonicalization -split-input-file | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: func @scf_for_canonicalize_min
|
||||
// CHECK: %[[C2:.*]] = arith.constant 2 : i64
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: mlir-opt %s -for-loop-peeling -canonicalize -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -for-loop-peeling=skip-partial=false -canonicalize -split-input-file | FileCheck %s -check-prefix=CHECK-NO-SKIP
|
||||
// RUN: mlir-opt %s -scf-for-loop-peeling -canonicalize -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -scf-for-loop-peeling=skip-partial=false -canonicalize -split-input-file | FileCheck %s -check-prefix=CHECK-NO-SKIP
|
||||
|
||||
// CHECK-DAG: #[[MAP0:.*]] = affine_map<()[s0, s1, s2] -> (s1 - (-s0 + s1) mod s2)>
|
||||
// CHECK-DAG: #[[MAP1:.*]] = affine_map<(d0)[s0] -> (-d0 + s0)>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -for-loop-specialization -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -scf-for-loop-specialization -split-input-file | FileCheck %s
|
||||
|
||||
#map0 = affine_map<()[s0, s1] -> (1024, s0 - s1)>
|
||||
#map1 = affine_map<()[s0, s1] -> (64, s0 - s1)>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(for-loop-range-folding)' -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(scf-for-loop-range-folding)' -split-input-file | FileCheck %s
|
||||
|
||||
func @fold_one_loop(%arg0: memref<?xi32>, %arg1: index, %arg2: index) {
|
||||
%c0 = arith.constant 0 : index
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(parallel-loop-fusion)' -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(scf-parallel-loop-fusion)' -split-input-file | FileCheck %s
|
||||
|
||||
func @fuse_empty_loops() {
|
||||
%c2 = arith.constant 2 : index
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -parallel-loop-specialization -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -scf-parallel-loop-specialization -split-input-file | FileCheck %s
|
||||
|
||||
#map0 = affine_map<()[s0, s1] -> (1024, s0 - s1)>
|
||||
#map1 = affine_map<()[s0, s1] -> (64, s0 - s1)>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(parallel-loop-tiling{parallel-loop-tile-sizes=1,4 no-min-max-bounds=true})' -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(scf-parallel-loop-tiling{parallel-loop-tile-sizes=1,4 no-min-max-bounds=true})' -split-input-file | FileCheck %s
|
||||
|
||||
func @parallel_loop(%arg0 : index, %arg1 : index, %arg2 : index,
|
||||
%arg3 : index, %arg4 : index, %arg5 : index,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(parallel-loop-tiling{parallel-loop-tile-sizes=1,4})' -split-input-file | FileCheck %s
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.func(scf-parallel-loop-tiling{parallel-loop-tile-sizes=1,4})' -split-input-file | FileCheck %s
|
||||
|
||||
func @parallel_loop(%arg0 : index, %arg1 : index, %arg2 : index,
|
||||
%arg3 : index, %arg4 : index, %arg5 : index,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt %s -sparsification="vectorization-strategy=2 vl=16" -for-loop-peeling -canonicalize | \
|
||||
// RUN: mlir-opt %s -sparsification="vectorization-strategy=2 vl=16" -scf-for-loop-peeling -canonicalize | \
|
||||
// RUN: FileCheck %s
|
||||
|
||||
#SparseVector = #sparse_tensor.encoding<{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(parallel-loop-collapsing{collapsed-indices-0=0,3 collapsed-indices-1=1,4 collapsed-indices-2=2}, canonicalize)' | FileCheck %s
|
||||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(scf-parallel-loop-collapsing{collapsed-indices-0=0,3 collapsed-indices-1=1,4 collapsed-indices-2=2}, canonicalize)' | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: func @parallel_many_dims() {
|
||||
func @parallel_many_dims() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(parallel-loop-collapsing{collapsed-indices-0=0,1}, canonicalize)' | FileCheck %s
|
||||
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.func(scf-parallel-loop-collapsing{collapsed-indices-0=0,1}, canonicalize)' | FileCheck %s
|
||||
|
||||
func @collapse_to_single() {
|
||||
%c0 = arith.constant 3 : index
|
||||
|
|
Loading…
Reference in New Issue