Skip to content

Commit 62a4e6a

Browse files
committed
[mlir] Remove unneeded cl::ZeroOrMore for ListOption variables. NFC
1 parent 15cb180 commit 62a4e6a

File tree

11 files changed

+18
-32
lines changed

11 files changed

+18
-32
lines changed

mlir/docs/PassManagement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ struct MyPass : PassWrapper<MyPass, OperationPass<ModuleOp>> {
780780
llvm::cl::desc("An example option"), llvm::cl::init(true)};
781781
ListOption<int64_t> listOption{
782782
*this, "example-list",
783-
llvm::cl::desc("An example list option"), llvm::cl::ZeroOrMore};
783+
llvm::cl::desc("An example list option")};
784784

785785
// Specify any statistics.
786786
Statistic statistic{this, "example-statistic", "An example statistic"};

mlir/include/mlir/Dialect/Affine/Passes.td

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ def AffineLoopTiling : Pass<"affine-loop-tile", "func::FuncOp"> {
193193
"Use this tile size for all loops">,
194194
ListOption<"tileSizes", "tile-sizes", "unsigned",
195195
"List of tile sizes for each perfect nest "
196-
"(overridden by -tile-size)",
197-
"llvm::cl::ZeroOrMore">,
196+
"(overridden by -tile-size)">,
198197
];
199198
}
200199

@@ -347,8 +346,7 @@ def AffineVectorize : Pass<"affine-super-vectorize", "func::FuncOp"> {
347346
let dependentDialects = ["vector::VectorDialect"];
348347
let options = [
349348
ListOption<"vectorSizes", "virtual-vector-size", "int64_t",
350-
"Specify an n-D virtual vector size for vectorization",
351-
"llvm::cl::ZeroOrMore">,
349+
"Specify an n-D virtual vector size for vectorization">,
352350
// Optionally, the fixed mapping from loop to fastest varying MemRef
353351
// dimension for all the MemRefs within a loop pattern:
354352
// the index represents the loop depth, the value represents the k^th
@@ -358,8 +356,7 @@ def AffineVectorize : Pass<"affine-super-vectorize", "func::FuncOp"> {
358356
ListOption<"fastestVaryingPattern", "test-fastest-varying", "int64_t",
359357
"Specify a 1-D, 2-D or 3-D pattern of fastest varying memory "
360358
"dimensions to match. See defaultPatterns in Vectorize.cpp for "
361-
"a description and examples. This is used for testing purposes",
362-
"llvm::cl::ZeroOrMore">,
359+
"a description and examples. This is used for testing purposes">,
363360
Option<"vectorizeReductions", "vectorize-reductions", "bool",
364361
/*default=*/"false",
365362
"Vectorize known reductions expressed via iter_args. "

mlir/include/mlir/Dialect/Linalg/Passes.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ def LinalgTiling : Pass<"linalg-tile", "func::FuncOp"> {
134134
"scf::SCFDialect"
135135
];
136136
let options = [
137-
ListOption<"tileSizes", "tile-sizes", "int64_t", "Tile sizes",
138-
"llvm::cl::ZeroOrMore">,
137+
ListOption<"tileSizes", "tile-sizes", "int64_t", "Tile sizes">,
139138
Option<"loopType", "loop-type", "std::string", /*default=*/"\"for\"",
140139
"Specify the type of loops to generate: for, parallel">
141140
];

mlir/include/mlir/Dialect/SCF/Transforms/Passes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def SCFParallelLoopTiling : Pass<"scf-parallel-loop-tiling"> {
7474
let constructor = "mlir::createParallelLoopTilingPass()";
7575
let options = [
7676
ListOption<"tileSizes", "parallel-loop-tile-sizes", "int64_t",
77-
"Factors to tile parallel loops by", "llvm::cl::ZeroOrMore">,
77+
"Factors to tile parallel loops by">,
7878
Option<"noMinMaxBounds", "no-min-max-bounds", "bool",
7979
/*default=*/"false",
8080
"Perform tiling with fixed upper bound with inbound check "

mlir/include/mlir/Reducer/Passes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def CommonReductionPassOptions {
2020
Option<"testerName", "test", "std::string", /* default */"",
2121
"The location of the tester which tests the file interestingness">,
2222
ListOption<"testerArgs", "test-arg", "std::string",
23-
"arguments of the tester", "llvm::cl::ZeroOrMore">,
23+
"arguments of the tester">,
2424
];
2525
}
2626

mlir/lib/Support/DebugCounter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct DebugCounterOptions {
2727
"mlir-debug-counter",
2828
llvm::cl::desc(
2929
"Comma separated list of debug counter skip and count arguments"),
30-
llvm::cl::CommaSeparated, llvm::cl::ZeroOrMore};
30+
llvm::cl::CommaSeparated};
3131

3232
llvm::cl::opt<bool> printCounterInfo{
3333
"mlir-print-debug-counter", llvm::cl::init(false), llvm::cl::Optional,

mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,14 @@ struct TestLinalgCodegenStrategy
101101
llvm::cl::init(false)};
102102
ListOption<std::string> paddingValues{
103103
*this, "padding-values",
104-
llvm::cl::desc("Operand padding values parsed by the attribute parser."),
105-
llvm::cl::ZeroOrMore};
104+
llvm::cl::desc("Operand padding values parsed by the attribute parser.")};
106105
ListOption<int64_t> paddingDimensions{
107106
*this, "padding-dimensions",
108-
llvm::cl::desc("Operation iterator dimensions to pad."),
109-
llvm::cl::ZeroOrMore};
107+
llvm::cl::desc("Operation iterator dimensions to pad.")};
110108
ListOption<int64_t> packPaddings{*this, "pack-paddings",
111-
llvm::cl::desc("Operand packing flags."),
112-
llvm::cl::ZeroOrMore};
109+
llvm::cl::desc("Operand packing flags.")};
113110
ListOption<int64_t> hoistPaddings{*this, "hoist-paddings",
114-
llvm::cl::desc("Operand hoisting depths."),
115-
llvm::cl::ZeroOrMore};
111+
llvm::cl::desc("Operand hoisting depths.")};
116112
ListOption<SmallVector<int64_t>> transposePaddings{
117113
*this, "transpose-paddings",
118114
llvm::cl::desc(
@@ -122,8 +118,7 @@ struct TestLinalgCodegenStrategy
122118
"It defines the interchange [1, 0, 2] for operand one and "
123119
"the interchange [0, 1] (no transpose) for the remaining operands."
124120
"All interchange vectors have to be permuations matching the "
125-
"operand rank."),
126-
llvm::cl::ZeroOrMore};
121+
"operand rank.")};
127122
Option<bool> generalize{*this, "generalize",
128123
llvm::cl::desc("Generalize named operations."),
129124
llvm::cl::init(false)};

mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ struct TestLinalgTileAndFuseSequencePass
286286
: PassWrapper(pass){};
287287

288288
ListOption<int64_t> tileSizes{*this, "tile-sizes",
289-
llvm::cl::desc("Tile sizes to use for ops"),
290-
llvm::cl::ZeroOrMore};
289+
llvm::cl::desc("Tile sizes to use for ops")};
291290

292291
void getDependentDialects(DialectRegistry &registry) const override {
293292
registry.insert<AffineDialect, linalg::LinalgDialect, memref::MemRefDialect,

mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ struct TestLinalgTransforms
121121
llvm::cl::init(false)};
122122
ListOption<int64_t> peeledLoops{
123123
*this, "peeled-loops",
124-
llvm::cl::desc("Loops to be peeled when test-tile-pattern"),
125-
llvm::cl::ZeroOrMore};
124+
llvm::cl::desc("Loops to be peeled when test-tile-pattern")};
126125
ListOption<int64_t> tileSizes{
127126
*this, "tile-sizes",
128-
llvm::cl::desc("Linalg tile sizes for test-tile-pattern"),
129-
llvm::cl::ZeroOrMore};
127+
llvm::cl::desc("Linalg tile sizes for test-tile-pattern")};
130128
Option<bool> skipPartial{
131129
*this, "skip-partial",
132130
llvm::cl::desc("Skip loops inside partial iterations during peeling"),

mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ struct TestSpirvEntryPointABIPass
4444
llvm::cl::desc(
4545
"Workgroup size to use for all gpu.func kernels in the module, "
4646
"specified with x-dimension first, y-dimension next and z-dimension "
47-
"last. Unspecified dimensions will be set to 1"),
48-
llvm::cl::ZeroOrMore};
47+
"last. Unspecified dimensions will be set to 1")};
4948
};
5049
} // namespace
5150

mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,7 @@ struct TestVectorUnrollingPatterns
356356
}
357357

358358
ListOption<int64_t> unrollOrder{*this, "unroll-order",
359-
llvm::cl::desc("set the unroll order"),
360-
llvm::cl::ZeroOrMore};
359+
llvm::cl::desc("set the unroll order")};
361360

362361
Option<bool> unrollBasedOnType{
363362
*this, "unroll-based-on-type",

0 commit comments

Comments
 (0)