aboutsummaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-06-05 01:07:50 -0700
committerFangrui Song <i@maskray.me>2022-06-05 01:07:51 -0700
commit95a134254a403750ddfee7c056efdf2359a7dc8c (patch)
treec8dd0df169da0845ecf7192873d9049295270ba7 /polly
parentd86a206f06a51c12a9fcf2c20199f4e819751c0c (diff)
downloadllvm-95a134254a403750ddfee7c056efdf2359a7dc8c.zip
llvm-95a134254a403750ddfee7c056efdf2359a7dc8c.tar.gz
llvm-95a134254a403750ddfee7c056efdf2359a7dc8c.tar.bz2
Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options
Diffstat (limited to 'polly')
-rw-r--r--polly/lib/Analysis/DependenceInfo.cpp6
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp6
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp3
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp3
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp4
-rw-r--r--polly/lib/CodeGen/IslAst.cpp2
-rw-r--r--polly/lib/CodeGen/IslExprBuilder.cpp2
-rw-r--r--polly/lib/CodeGen/ManagedMemoryRewrite.cpp2
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp22
-rw-r--r--polly/lib/Support/RegisterPasses.cpp11
-rw-r--r--polly/lib/Transform/DeadCodeElimination.cpp2
-rw-r--r--polly/lib/Transform/MatmulOptimizer.cpp4
-rw-r--r--polly/lib/Transform/ScheduleOptimizer.cpp6
13 files changed, 34 insertions, 39 deletions
diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp
index dc6ed169..f29355ff 100644
--- a/polly/lib/Analysis/DependenceInfo.cpp
+++ b/polly/lib/Analysis/DependenceInfo.cpp
@@ -66,8 +66,7 @@ static cl::opt<enum AnalysisType> OptAnalysisType(
"Exact dependences without transitive dependences"),
clEnumValN(MEMORY_BASED_ANALYSIS, "memory-based",
"Overapproximation of dependences")),
- cl::Hidden, cl::init(VALUE_BASED_ANALYSIS), cl::ZeroOrMore,
- cl::cat(PollyCategory));
+ cl::Hidden, cl::init(VALUE_BASED_ANALYSIS), cl::cat(PollyCategory));
static cl::opt<Dependences::AnalysisLevel> OptAnalysisLevel(
"polly-dependences-analysis-level",
@@ -80,8 +79,7 @@ static cl::opt<Dependences::AnalysisLevel> OptAnalysisLevel(
clEnumValN(Dependences::AL_Access, "access-wise",
"Memory reference level analysis that distinguish"
" access instructions in the same statement")),
- cl::Hidden, cl::init(Dependences::AL_Statement), cl::ZeroOrMore,
- cl::cat(PollyCategory));
+ cl::Hidden, cl::init(Dependences::AL_Statement), cl::cat(PollyCategory));
//===----------------------------------------------------------------------===//
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index f9c39c1..9d7b4c4 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -117,7 +117,7 @@ static cl::list<std::string> OnlyFunctions(
"Multiple regexes can be comma separated. "
"Scop detection will run on all functions that match "
"ANY of the regexes provided."),
- cl::ZeroOrMore, cl::CommaSeparated, cl::cat(PollyCategory));
+ cl::CommaSeparated, cl::cat(PollyCategory));
static cl::list<std::string> IgnoredFunctions(
"polly-ignore-func",
@@ -125,7 +125,7 @@ static cl::list<std::string> IgnoredFunctions(
"Multiple regexes can be comma separated. "
"Scop detection will ignore all functions that match "
"ANY of the regexes provided."),
- cl::ZeroOrMore, cl::CommaSeparated, cl::cat(PollyCategory));
+ cl::CommaSeparated, cl::cat(PollyCategory));
bool polly::PollyAllowFullFunction;
@@ -207,7 +207,7 @@ static cl::opt<bool, true>
PollyDelinearizeX("polly-delinearize",
cl::desc("Delinearize array access functions"),
cl::location(PollyDelinearize), cl::Hidden,
- cl::ZeroOrMore, cl::init(true), cl::cat(PollyCategory));
+ cl::init(true), cl::cat(PollyCategory));
static cl::opt<bool>
VerifyScops("polly-detect-verify",
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 0649908..ca81d43 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -155,8 +155,7 @@ bool polly::UseInstructionNames;
static cl::opt<bool, true> XUseInstructionNames(
"polly-use-llvm-names",
cl::desc("Use LLVM-IR names when deriving statement names"),
- cl::location(UseInstructionNames), cl::Hidden, cl::init(false),
- cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::location(UseInstructionNames), cl::Hidden, cl::cat(PollyCategory));
static cl::opt<bool> PollyPrintInstructions(
"polly-print-instructions", cl::desc("Output instructions per ScopStmt"),
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 2f7d7a9..a98cfa1 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -39,8 +39,7 @@ bool PollyDebugPrinting;
static cl::opt<bool, true> DebugPrintingX(
"polly-codegen-add-debug-printing",
cl::desc("Add printf calls that show the values loaded/stored."),
- cl::location(PollyDebugPrinting), cl::Hidden, cl::init(false),
- cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::location(PollyDebugPrinting), cl::Hidden, cl::cat(PollyCategory));
static cl::opt<bool> TraceStmts(
"polly-codegen-trace-stmts",
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index f3e8068..b124525 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -58,8 +58,8 @@ bool polly::PerfMonitoring;
static cl::opt<bool, true>
XPerfMonitoring("polly-codegen-perf-monitoring",
cl::desc("Add run-time performance monitoring"), cl::Hidden,
- cl::location(polly::PerfMonitoring), cl::init(false),
- cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::location(polly::PerfMonitoring),
+ cl::cat(PollyCategory));
STATISTIC(ScopsProcessed, "Number of SCoP processed");
STATISTIC(CodegenedScops, "Number of successfully generated SCoPs");
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index 338be5b..5041db9 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -72,7 +72,7 @@ static cl::opt<bool> PollyParallelForce(
"polly-parallel-force",
cl::desc(
"Force generation of thread parallel code ignoring any cost model"),
- cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::cat(PollyCategory));
static cl::opt<bool> UseContext("polly-ast-use-context",
cl::desc("Use context"), cl::Hidden,
diff --git a/polly/lib/CodeGen/IslExprBuilder.cpp b/polly/lib/CodeGen/IslExprBuilder.cpp
index dab0ca1..12b724c 100644
--- a/polly/lib/CodeGen/IslExprBuilder.cpp
+++ b/polly/lib/CodeGen/IslExprBuilder.cpp
@@ -34,7 +34,7 @@ static cl::opt<OverflowTrackingChoice> OTMode(
"Track the overflow bit if requested."),
clEnumValN(OT_ALWAYS, "always",
"Always track the overflow bit.")),
- cl::Hidden, cl::init(OT_REQUEST), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(OT_REQUEST), cl::cat(PollyCategory));
IslExprBuilder::IslExprBuilder(Scop &S, PollyIRBuilder &Builder,
IDToValueTy &IDToValue, ValueMapT &GlobalMap,
diff --git a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
index a397692..e074917 100644
--- a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
+++ b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp
@@ -40,7 +40,7 @@ static cl::opt<bool> IgnoreLinkageForGlobals(
cl::desc(
"By default, we only rewrite globals with internal linkage. This flag "
"enables rewriting of globals regardless of linkage"),
- cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::cat(PollyCategory));
#define DEBUG_TYPE "polly-acc-rewrite-managed-memory"
namespace {
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 5f3659e..170f08e 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -87,7 +87,7 @@ static cl::opt<bool, true>
" that all memory has been"
" declared as managed memory"),
cl::location(PollyManagedMemory), cl::Hidden,
- cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::init(false), cl::cat(PollyCategory));
static cl::opt<bool>
FailOnVerifyModuleFailure("polly-acc-fail-on-verify-module-failure",
@@ -112,14 +112,15 @@ static cl::opt<int>
cl::Hidden, cl::init(10 * 512 * 512));
GPURuntime polly::GPURuntimeChoice;
-static cl::opt<GPURuntime, true> XGPURuntimeChoice(
- "polly-gpu-runtime", cl::desc("The GPU Runtime API to target"),
- cl::values(clEnumValN(GPURuntime::CUDA, "libcudart",
- "use the CUDA Runtime API"),
- clEnumValN(GPURuntime::OpenCL, "libopencl",
- "use the OpenCL Runtime API")),
- cl::location(polly::GPURuntimeChoice), cl::init(GPURuntime::CUDA),
- cl::ZeroOrMore, cl::cat(PollyCategory));
+static cl::opt<GPURuntime, true>
+ XGPURuntimeChoice("polly-gpu-runtime",
+ cl::desc("The GPU Runtime API to target"),
+ cl::values(clEnumValN(GPURuntime::CUDA, "libcudart",
+ "use the CUDA Runtime API"),
+ clEnumValN(GPURuntime::OpenCL, "libopencl",
+ "use the OpenCL Runtime API")),
+ cl::location(polly::GPURuntimeChoice),
+ cl::init(GPURuntime::CUDA), cl::cat(PollyCategory));
GPUArch polly::GPUArchChoice;
static cl::opt<GPUArch, true>
@@ -131,8 +132,7 @@ static cl::opt<GPUArch, true>
clEnumValN(GPUArch::SPIR64, "spir64",
"target SPIR 64-bit architecture")),
cl::location(polly::GPUArchChoice),
- cl::init(GPUArch::NVPTX64), cl::ZeroOrMore,
- cl::cat(PollyCategory));
+ cl::init(GPUArch::NVPTX64), cl::cat(PollyCategory));
extern bool polly::PerfMonitoring;
diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp
index bd99bd1..2c81f946 100644
--- a/polly/lib/Support/RegisterPasses.cpp
+++ b/polly/lib/Support/RegisterPasses.cpp
@@ -88,8 +88,7 @@ static cl::opt<PassPositionChoice> PassPosition(
"After the loop optimizer (but within the inline cycle)"),
clEnumValN(POSITION_BEFORE_VECTORIZER, "before-vectorizer",
"Right before the vectorizer")),
- cl::Hidden, cl::init(POSITION_BEFORE_VECTORIZER), cl::ZeroOrMore,
- cl::cat(PollyCategory));
+ cl::Hidden, cl::init(POSITION_BEFORE_VECTORIZER), cl::cat(PollyCategory));
static cl::opt<OptimizerChoice>
Optimizer("polly-optimizer", cl::desc("Select the scheduling optimizer"),
@@ -104,7 +103,7 @@ static cl::opt<CodeGenChoice> CodeGeneration(
cl::values(clEnumValN(CODEGEN_FULL, "full", "AST and IR generation"),
clEnumValN(CODEGEN_AST, "ast", "Only AST generation"),
clEnumValN(CODEGEN_NONE, "none", "No code generation")),
- cl::Hidden, cl::init(CODEGEN_FULL), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(CODEGEN_FULL), cl::cat(PollyCategory));
enum TargetChoice { TARGET_CPU, TARGET_GPU, TARGET_HYBRID };
static cl::opt<TargetChoice>
@@ -117,7 +116,7 @@ static cl::opt<TargetChoice>
"generate GPU code (preferably) or CPU code")
#endif
),
- cl::init(TARGET_CPU), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::init(TARGET_CPU), cl::cat(PollyCategory));
VectorizerChoice PollyVectorizerChoice;
@@ -130,7 +129,7 @@ static cl::opt<VectorizerChoice, true> Vectorizer(
VECTORIZER_STRIPMINE, "stripmine",
"Strip-mine outer loops for the loop-vectorizer to trigger")),
cl::location(PollyVectorizerChoice), cl::init(VECTORIZER_NONE),
- cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::cat(PollyCategory));
static cl::opt<bool> ImportJScop(
"polly-import",
@@ -155,7 +154,7 @@ static cl::opt<bool> PollyViewer(
"polly-show",
cl::desc("Highlight the code regions that will be optimized in a "
"(CFG BBs and LLVM-IR instructions)"),
- cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::cat(PollyCategory));
static cl::opt<bool> PollyOnlyViewer(
"polly-show-only",
diff --git a/polly/lib/Transform/DeadCodeElimination.cpp b/polly/lib/Transform/DeadCodeElimination.cpp
index 42b48f4..5cb89fe 100644
--- a/polly/lib/Transform/DeadCodeElimination.cpp
+++ b/polly/lib/Transform/DeadCodeElimination.cpp
@@ -49,7 +49,7 @@ cl::opt<int> DCEPreciseSteps(
cl::desc("The number of precise steps between two approximating "
"iterations. (A value of -1 schedules another approximation stage "
"before the actual dead code elimination."),
- cl::ZeroOrMore, cl::init(-1), cl::cat(PollyCategory));
+ cl::init(-1), cl::cat(PollyCategory));
class DeadCodeElimWrapperPass final : public ScopPass {
public:
diff --git a/polly/lib/Transform/MatmulOptimizer.cpp b/polly/lib/Transform/MatmulOptimizer.cpp
index 84c7da6..4a40fac 100644
--- a/polly/lib/Transform/MatmulOptimizer.cpp
+++ b/polly/lib/Transform/MatmulOptimizer.cpp
@@ -54,14 +54,14 @@ static cl::opt<int> LatencyVectorFma(
cl::desc("The minimal number of cycles between issuing two "
"dependent consecutive vector fused multiply-add "
"instructions."),
- cl::Hidden, cl::init(8), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(8), cl::cat(PollyCategory));
static cl::opt<int> ThroughputVectorFma(
"polly-target-throughput-vector-fma",
cl::desc("A throughput of the processor floating-point arithmetic units "
"expressed in the number of vector fused multiply-add "
"instructions per clock cycle."),
- cl::Hidden, cl::init(1), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(1), cl::cat(PollyCategory));
static cl::opt<int> FirstCacheLevelSize(
"polly-target-1st-cache-level-size",
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index cc139c1..c036651 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -121,7 +121,7 @@ static cl::opt<int> FirstLevelDefaultTileSize(
"polly-default-tile-size",
cl::desc("The default tile size (if not enough were provided by"
" --polly-tile-sizes)"),
- cl::Hidden, cl::init(32), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(32), cl::cat(PollyCategory));
static cl::list<int>
FirstLevelTileSizes("polly-tile-sizes",
@@ -155,7 +155,7 @@ static cl::opt<int> RegisterDefaultTileSize(
"polly-register-tiling-default-tile-size",
cl::desc("The default register tile size (if not enough were provided by"
" --polly-register-tile-sizes)"),
- cl::Hidden, cl::init(2), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(2), cl::cat(PollyCategory));
static cl::list<int>
RegisterTileSizes("polly-register-tile-sizes",
@@ -188,7 +188,7 @@ static cl::opt<bool> OptimizedScops(
cl::desc("Polly - Dump polyhedral description of Scops optimized with "
"the isl scheduling optimizer and the set of post-scheduling "
"transformations is applied on the schedule tree"),
- cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::cat(PollyCategory));
STATISTIC(ScopsProcessed, "Number of scops processed");
STATISTIC(ScopsRescheduled, "Number of scops rescheduled");