[Mlir-commits] [mlir] 62a4e6a - [mlir] Remove unneeded cl::ZeroOrMore for ListOption variables. NFC
Fangrui Song
llvmlistbot at llvm.org
Thu Jun 30 19:04:49 PDT 2022
Author: Fangrui Song
Date: 2022-06-30T19:04:44-07:00
New Revision: 62a4e6ab15858c466b36a0af820eddff3c8e7cca
URL: https://github.com/llvm/llvm-project/commit/62a4e6ab15858c466b36a0af820eddff3c8e7cca
DIFF: https://github.com/llvm/llvm-project/commit/62a4e6ab15858c466b36a0af820eddff3c8e7cca.diff
LOG: [mlir] Remove unneeded cl::ZeroOrMore for ListOption variables. NFC
Added:
Modified:
mlir/docs/PassManagement.md
mlir/include/mlir/Dialect/Affine/Passes.td
mlir/include/mlir/Dialect/Linalg/Passes.td
mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
mlir/include/mlir/Reducer/Passes.td
mlir/lib/Support/DebugCounter.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
Removed:
################################################################################
diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md
index 28af30770a36..e0d2400b8a34 100644
--- a/mlir/docs/PassManagement.md
+++ b/mlir/docs/PassManagement.md
@@ -780,7 +780,7 @@ struct MyPass : PassWrapper<MyPass, OperationPass<ModuleOp>> {
llvm::cl::desc("An example option"), llvm::cl::init(true)};
ListOption<int64_t> listOption{
*this, "example-list",
- llvm::cl::desc("An example list option"), llvm::cl::ZeroOrMore};
+ llvm::cl::desc("An example list option")};
// Specify any statistics.
Statistic statistic{this, "example-statistic", "An example statistic"};
diff --git a/mlir/include/mlir/Dialect/Affine/Passes.td b/mlir/include/mlir/Dialect/Affine/Passes.td
index 9187fa8574d9..c1c388b06518 100644
--- a/mlir/include/mlir/Dialect/Affine/Passes.td
+++ b/mlir/include/mlir/Dialect/Affine/Passes.td
@@ -193,8 +193,7 @@ def AffineLoopTiling : Pass<"affine-loop-tile", "func::FuncOp"> {
"Use this tile size for all loops">,
ListOption<"tileSizes", "tile-sizes", "unsigned",
"List of tile sizes for each perfect nest "
- "(overridden by -tile-size)",
- "llvm::cl::ZeroOrMore">,
+ "(overridden by -tile-size)">,
];
}
@@ -347,8 +346,7 @@ def AffineVectorize : Pass<"affine-super-vectorize", "func::FuncOp"> {
let dependentDialects = ["vector::VectorDialect"];
let options = [
ListOption<"vectorSizes", "virtual-vector-size", "int64_t",
- "Specify an n-D virtual vector size for vectorization",
- "llvm::cl::ZeroOrMore">,
+ "Specify an n-D virtual vector size for vectorization">,
// Optionally, the fixed mapping from loop to fastest varying MemRef
// dimension for all the MemRefs within a loop pattern:
// the index represents the loop depth, the value represents the k^th
@@ -358,8 +356,7 @@ def AffineVectorize : Pass<"affine-super-vectorize", "func::FuncOp"> {
ListOption<"fastestVaryingPattern", "test-fastest-varying", "int64_t",
"Specify a 1-D, 2-D or 3-D pattern of fastest varying memory "
"dimensions to match. See defaultPatterns in Vectorize.cpp for "
- "a description and examples. This is used for testing purposes",
- "llvm::cl::ZeroOrMore">,
+ "a description and examples. This is used for testing purposes">,
Option<"vectorizeReductions", "vectorize-reductions", "bool",
/*default=*/"false",
"Vectorize known reductions expressed via iter_args. "
diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td
index f53624d1d02c..7db97946af05 100644
--- a/mlir/include/mlir/Dialect/Linalg/Passes.td
+++ b/mlir/include/mlir/Dialect/Linalg/Passes.td
@@ -134,8 +134,7 @@ def LinalgTiling : Pass<"linalg-tile", "func::FuncOp"> {
"scf::SCFDialect"
];
let options = [
- ListOption<"tileSizes", "tile-sizes", "int64_t", "Tile sizes",
- "llvm::cl::ZeroOrMore">,
+ ListOption<"tileSizes", "tile-sizes", "int64_t", "Tile sizes">,
Option<"loopType", "loop-type", "std::string", /*default=*/"\"for\"",
"Specify the type of loops to generate: for, parallel">
];
diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td b/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
index 896859d5ee37..9abffe58a924 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/SCF/Transforms/Passes.td
@@ -74,7 +74,7 @@ def SCFParallelLoopTiling : Pass<"scf-parallel-loop-tiling"> {
let constructor = "mlir::createParallelLoopTilingPass()";
let options = [
ListOption<"tileSizes", "parallel-loop-tile-sizes", "int64_t",
- "Factors to tile parallel loops by", "llvm::cl::ZeroOrMore">,
+ "Factors to tile parallel loops by">,
Option<"noMinMaxBounds", "no-min-max-bounds", "bool",
/*default=*/"false",
"Perform tiling with fixed upper bound with inbound check "
diff --git a/mlir/include/mlir/Reducer/Passes.td b/mlir/include/mlir/Reducer/Passes.td
index acaf90f38e0f..cf8917610605 100644
--- a/mlir/include/mlir/Reducer/Passes.td
+++ b/mlir/include/mlir/Reducer/Passes.td
@@ -20,7 +20,7 @@ def CommonReductionPassOptions {
Option<"testerName", "test", "std::string", /* default */"",
"The location of the tester which tests the file interestingness">,
ListOption<"testerArgs", "test-arg", "std::string",
- "arguments of the tester", "llvm::cl::ZeroOrMore">,
+ "arguments of the tester">,
];
}
diff --git a/mlir/lib/Support/DebugCounter.cpp b/mlir/lib/Support/DebugCounter.cpp
index e0fabb3fa1e2..cf33fcc09b96 100644
--- a/mlir/lib/Support/DebugCounter.cpp
+++ b/mlir/lib/Support/DebugCounter.cpp
@@ -27,7 +27,7 @@ struct DebugCounterOptions {
"mlir-debug-counter",
llvm::cl::desc(
"Comma separated list of debug counter skip and count arguments"),
- llvm::cl::CommaSeparated, llvm::cl::ZeroOrMore};
+ llvm::cl::CommaSeparated};
llvm::cl::opt<bool> printCounterInfo{
"mlir-print-debug-counter", llvm::cl::init(false), llvm::cl::Optional,
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
index 883d9a3ad579..efe8f38bc23b 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
@@ -101,18 +101,14 @@ struct TestLinalgCodegenStrategy
llvm::cl::init(false)};
ListOption<std::string> paddingValues{
*this, "padding-values",
- llvm::cl::desc("Operand padding values parsed by the attribute parser."),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Operand padding values parsed by the attribute parser.")};
ListOption<int64_t> paddingDimensions{
*this, "padding-dimensions",
- llvm::cl::desc("Operation iterator dimensions to pad."),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Operation iterator dimensions to pad.")};
ListOption<int64_t> packPaddings{*this, "pack-paddings",
- llvm::cl::desc("Operand packing flags."),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Operand packing flags.")};
ListOption<int64_t> hoistPaddings{*this, "hoist-paddings",
- llvm::cl::desc("Operand hoisting depths."),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Operand hoisting depths.")};
ListOption<SmallVector<int64_t>> transposePaddings{
*this, "transpose-paddings",
llvm::cl::desc(
@@ -122,8 +118,7 @@ struct TestLinalgCodegenStrategy
"It defines the interchange [1, 0, 2] for operand one and "
"the interchange [0, 1] (no transpose) for the remaining operands."
"All interchange vectors have to be permuations matching the "
- "operand rank."),
- llvm::cl::ZeroOrMore};
+ "operand rank.")};
Option<bool> generalize{*this, "generalize",
llvm::cl::desc("Generalize named operations."),
llvm::cl::init(false)};
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
index a266cdc9d3c4..63ebe4024f7f 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
@@ -286,8 +286,7 @@ struct TestLinalgTileAndFuseSequencePass
: PassWrapper(pass){};
ListOption<int64_t> tileSizes{*this, "tile-sizes",
- llvm::cl::desc("Tile sizes to use for ops"),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Tile sizes to use for ops")};
void getDependentDialects(DialectRegistry ®istry) const override {
registry.insert<AffineDialect, linalg::LinalgDialect, memref::MemRefDialect,
diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
index 2c44d2ff83ee..dfe046ef9c9d 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
@@ -121,12 +121,10 @@ struct TestLinalgTransforms
llvm::cl::init(false)};
ListOption<int64_t> peeledLoops{
*this, "peeled-loops",
- llvm::cl::desc("Loops to be peeled when test-tile-pattern"),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Loops to be peeled when test-tile-pattern")};
ListOption<int64_t> tileSizes{
*this, "tile-sizes",
- llvm::cl::desc("Linalg tile sizes for test-tile-pattern"),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("Linalg tile sizes for test-tile-pattern")};
Option<bool> skipPartial{
*this, "skip-partial",
llvm::cl::desc("Skip loops inside partial iterations during peeling"),
diff --git a/mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp b/mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp
index 0e67aa7fc418..f9b67554ffee 100644
--- a/mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp
+++ b/mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp
@@ -44,8 +44,7 @@ struct TestSpirvEntryPointABIPass
llvm::cl::desc(
"Workgroup size to use for all gpu.func kernels in the module, "
"specified with x-dimension first, y-dimension next and z-dimension "
- "last. Unspecified dimensions will be set to 1"),
- llvm::cl::ZeroOrMore};
+ "last. Unspecified dimensions will be set to 1")};
};
} // namespace
diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 9da1ff7a44dd..20ce2471cf17 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -356,8 +356,7 @@ struct TestVectorUnrollingPatterns
}
ListOption<int64_t> unrollOrder{*this, "unroll-order",
- llvm::cl::desc("set the unroll order"),
- llvm::cl::ZeroOrMore};
+ llvm::cl::desc("set the unroll order")};
Option<bool> unrollBasedOnType{
*this, "unroll-based-on-type",
More information about the Mlir-commits
mailing list