Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options

This commit is contained in:
Fangrui Song 2022-06-05 01:07:50 -07:00
parent d86a206f06
commit 95a134254a
45 changed files with 98 additions and 117 deletions

View File

@ -109,7 +109,7 @@ static cl::list<std::string>
cl::cat(ClangLinkerWrapperCategory));
static cl::list<std::string>
LinkerArgs("device-linker", cl::ZeroOrMore,
LinkerArgs("device-linker",
cl::desc("Arguments to pass to the device linker invocation"),
cl::value_desc("<value> or <triple>=<value>"),
cl::cat(ClangLinkerWrapperCategory));

View File

@ -74,7 +74,7 @@ static cl::opt<bool> Inplace("i", cl::desc("Overwrite edited <file>s."),
static cl::list<std::string>
QualifiedNames("qualified-name",
cl::desc("The fully qualified name of the symbol."),
cl::ZeroOrMore, cl::cat(ClangRenameOptions));
cl::cat(ClangRenameOptions));
static cl::list<std::string>
NewNames("new-name", cl::desc("The new name to change the symbol to."),

View File

@ -105,7 +105,7 @@ static cl::list<std::string> InputFiles(cl::Positional, cl::OneOrMore,
// Command line arguments to pass to the JITed main function.
static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs);
cl::PositionalEatsArgs);
// Given paths must exist on the remote target.
static cl::list<std::string>

View File

@ -146,8 +146,8 @@ static cl::opt<int> SwpLoopLimit("pipeliner-max", cl::Hidden, cl::init(-1));
#endif
static cl::opt<bool> SwpIgnoreRecMII("pipeliner-ignore-recmii",
cl::ReallyHidden, cl::init(false),
cl::ZeroOrMore, cl::desc("Ignore RecMII"));
cl::ReallyHidden,
cl::desc("Ignore RecMII"));
static cl::opt<bool> SwpShowResMask("pipeliner-show-mask", cl::Hidden,
cl::init(false));

View File

@ -115,20 +115,18 @@ static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden,
cl::desc("Dump garbage collector data"));
static cl::opt<cl::boolOrDefault>
VerifyMachineCode("verify-machineinstrs", cl::Hidden,
cl::desc("Verify generated machine code"),
cl::ZeroOrMore);
static cl::opt<cl::boolOrDefault> DebugifyAndStripAll(
"debugify-and-strip-all-safe", cl::Hidden,
cl::desc(
"Debugify MIR before and Strip debug after "
"each pass except those known to be unsafe when debug info is present"),
cl::ZeroOrMore);
cl::desc("Verify generated machine code"));
static cl::opt<cl::boolOrDefault>
DebugifyAndStripAll("debugify-and-strip-all-safe", cl::Hidden,
cl::desc("Debugify MIR before and Strip debug after "
"each pass except those known to be unsafe "
"when debug info is present"));
static cl::opt<cl::boolOrDefault> DebugifyCheckAndStripAll(
"debugify-check-and-strip-all-safe", cl::Hidden,
cl::desc(
"Debugify MIR before, by checking and stripping the debug info after, "
"each pass except those known to be unsafe when debug info is present"),
cl::ZeroOrMore);
"each pass except those known to be unsafe when debug info is "
"present"));
// Enable or disable the MachineOutliner.
static cl::opt<RunOutliner> EnableMachineOutliner(
"enable-machine-outliner", cl::desc("Enable the machine outliner"),

View File

@ -45,7 +45,7 @@ static cl::opt<bool> IgnoreBBRegPressure("ignore-bb-reg-pressure", cl::Hidden,
cl::init(false));
static cl::opt<bool> UseNewerCandidate("use-newer-candidate", cl::Hidden,
cl::ZeroOrMore, cl::init(true));
cl::init(true));
static cl::opt<unsigned> SchedDebugVerboseLevel("misched-verbose-level",
cl::Hidden, cl::init(1));

View File

@ -47,8 +47,7 @@ static cl::opt<PassRemarksOpt, true, cl::parser<std::string>> PassRemarks(
"pass-remarks", cl::value_desc("pattern"),
cl::desc("Enable optimization remarks from passes whose name match "
"the given regular expression"),
cl::Hidden, cl::location(PassRemarksPassedOptLoc), cl::ValueRequired,
cl::ZeroOrMore);
cl::Hidden, cl::location(PassRemarksPassedOptLoc), cl::ValueRequired);
// -pass-remarks-missed
// Command line flag to enable emitOptimizationRemarkMissed()
@ -56,8 +55,7 @@ static cl::opt<PassRemarksOpt, true, cl::parser<std::string>> PassRemarksMissed(
"pass-remarks-missed", cl::value_desc("pattern"),
cl::desc("Enable missed optimization remarks from passes whose name match "
"the given regular expression"),
cl::Hidden, cl::location(PassRemarksMissedOptLoc), cl::ValueRequired,
cl::ZeroOrMore);
cl::Hidden, cl::location(PassRemarksMissedOptLoc), cl::ValueRequired);
// -pass-remarks-analysis
// Command line flag to enable emitOptimizationRemarkAnalysis()
@ -67,8 +65,7 @@ static cl::opt<PassRemarksOpt, true, cl::parser<std::string>>
cl::desc(
"Enable optimization analysis remarks from passes whose name match "
"the given regular expression"),
cl::Hidden, cl::location(PassRemarksAnalysisOptLoc), cl::ValueRequired,
cl::ZeroOrMore);
cl::Hidden, cl::location(PassRemarksAnalysisOptLoc), cl::ValueRequired);
}
bool DiagnosticHandler::isAnalysisRemarkEnabled(StringRef PassName) const {

View File

@ -49,8 +49,7 @@ struct CreateDebugCounterOption {
return new DebugCounterList(
"debug-counter", cl::Hidden,
cl::desc("Comma separated list of debug counter skip and count"),
cl::CommaSeparated, cl::ZeroOrMore,
cl::location(DebugCounter::instance()));
cl::CommaSeparated, cl::location(DebugCounter::instance()));
}
};
} // namespace

View File

@ -21,11 +21,10 @@ struct CreateScalableErrorAsWarning {
/// using the wrong interface on a scalable vector.
static void *call() {
return new cl::opt<bool>(
"treat-scalable-fixed-error-as-warning", cl::Hidden, cl::init(false),
"treat-scalable-fixed-error-as-warning", cl::Hidden,
cl::desc(
"Treat issues where a fixed-width property is requested from a "
"scalable type as a warning, instead of an error."),
cl::ZeroOrMore);
"scalable type as a warning, instead of an error"));
}
};
} // namespace

View File

@ -28,10 +28,10 @@
#define GET_INSTRMAP_INFO
#include "AMDGPUGenInstrInfo.inc"
static llvm::cl::opt<unsigned> AmdhsaCodeObjectVersion(
"amdhsa-code-object-version", llvm::cl::Hidden,
llvm::cl::desc("AMDHSA Code Object Version"), llvm::cl::init(4),
llvm::cl::ZeroOrMore);
static llvm::cl::opt<unsigned>
AmdhsaCodeObjectVersion("amdhsa-code-object-version", llvm::cl::Hidden,
llvm::cl::desc("AMDHSA Code Object Version"),
llvm::cl::init(4));
namespace {

View File

@ -54,8 +54,7 @@ using namespace llvm;
static cl::opt<bool> OptSpeculate("commgep-speculate", cl::init(true),
cl::Hidden);
static cl::opt<bool> OptEnableInv("commgep-inv", cl::init(true), cl::Hidden,
cl::ZeroOrMore);
static cl::opt<bool> OptEnableInv("commgep-inv", cl::init(true), cl::Hidden);
static cl::opt<bool> OptEnableConst("commgep-const", cl::init(true),
cl::Hidden);

View File

@ -152,9 +152,10 @@ using namespace llvm;
static cl::opt<bool> DisableDeallocRet("disable-hexagon-dealloc-ret",
cl::Hidden, cl::desc("Disable Dealloc Return for Hexagon target"));
static cl::opt<unsigned> NumberScavengerSlots("number-scavenger-slots",
cl::Hidden, cl::desc("Set the number of scavenger slots"), cl::init(2),
cl::ZeroOrMore);
static cl::opt<unsigned>
NumberScavengerSlots("number-scavenger-slots", cl::Hidden,
cl::desc("Set the number of scavenger slots"),
cl::init(2));
static cl::opt<int>
SpillFuncThreshold("spill-func-threshold", cl::Hidden,

View File

@ -72,14 +72,11 @@ static cl::opt<bool>
cl::desc("Enable detailed timing of insert "
"generation"));
static cl::opt<bool> OptSelectAll0("insert-all0", cl::init(false), cl::Hidden,
cl::ZeroOrMore);
static cl::opt<bool> OptSelectHas0("insert-has0", cl::init(false), cl::Hidden,
cl::ZeroOrMore);
static cl::opt<bool> OptSelectAll0("insert-all0", cl::init(false), cl::Hidden);
static cl::opt<bool> OptSelectHas0("insert-has0", cl::init(false), cl::Hidden);
// Whether to construct constant values via "insert". Could eliminate constant
// extenders, but often not practical.
static cl::opt<bool> OptConst("insert-const", cl::init(false), cl::Hidden,
cl::ZeroOrMore);
static cl::opt<bool> OptConst("insert-const", cl::init(false), cl::Hidden);
// The preprocessor gets confused when the DEBUG macro is passed larger
// chunks of code. Use this function to detect debugging.

View File

@ -129,7 +129,7 @@ static cl::list<std::string> FunctionSeedAllowList(
"attributor-function-seed-allow-list", cl::Hidden,
cl::desc("Comma seperated list of function names that are "
"allowed to be seeded."),
cl::ZeroOrMore, cl::CommaSeparated);
cl::CommaSeparated);
#endif
static cl::opt<bool>

View File

@ -202,8 +202,7 @@ static cl::opt<bool> ClUseShortGranules(
static cl::opt<bool> ClInstrumentPersonalityFunctions(
"hwasan-instrument-personality-functions",
cl::desc("instrument personality functions"), cl::Hidden, cl::init(false),
cl::ZeroOrMore);
cl::desc("instrument personality functions"), cl::Hidden);
static cl::opt<bool> ClInlineAllChecks("hwasan-inline-all-checks",
cl::desc("inline all checks"),

View File

@ -118,7 +118,7 @@ cl::opt<bool> DoCounterPromotion("do-counter-promotion",
cl::desc("Do counter register promotion"),
cl::init(false));
cl::opt<unsigned> MaxNumOfPromotionsPerLoop(
cl::ZeroOrMore, "max-counter-promotions-per-loop", cl::init(20),
"max-counter-promotions-per-loop", cl::init(20),
cl::desc("Max number counter promotions per loop to avoid"
" increasing register pressure too much"));

View File

@ -117,7 +117,7 @@ static cl::opt<FusionDependenceAnalysisChoice> FusionDependenceAnalysis(
"Use the dependence analysis interface"),
clEnumValN(FUSION_DEPENDENCE_ANALYSIS_ALL, "all",
"Use all available analyses")),
cl::Hidden, cl::init(FUSION_DEPENDENCE_ANALYSIS_ALL), cl::ZeroOrMore);
cl::Hidden, cl::init(FUSION_DEPENDENCE_ANALYSIS_ALL));
static cl::opt<unsigned> FusionPeelMaxCount(
"loop-fusion-peel-max-count", cl::init(0), cl::Hidden,

View File

@ -119,7 +119,7 @@ cl::list<std::string> ToolArgv("tool-args", cl::Positional,
cl::list<std::string> SafeToolArgv("safe-tool-args", cl::Positional,
cl::desc("<safe-tool arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs);
cl::PositionalEatsArgs);
cl::opt<std::string> CCBinary("gcc", cl::init(""),
cl::desc("The gcc binary to use."));

View File

@ -144,8 +144,7 @@ namespace {
"-extra-module arguments."));
cl::list<std::string>
Dylibs("dlopen", cl::desc("Dynamic libraries to load before linking"),
cl::ZeroOrMore);
Dylibs("dlopen", cl::desc("Dynamic libraries to load before linking"));
// The MCJIT supports building for a target address space separate from
// the JIT compilation process. Use a forked process and a copying

View File

@ -671,7 +671,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
"name-allowlist", cl::Optional,
cl::desc("Show code coverage only for functions listed in the given "
"file"),
cl::ZeroOrMore, cl::cat(FilteringCategory));
cl::cat(FilteringCategory));
// Allow for accepting previous option name.
cl::list<std::string> NameFilterFilesDeprecated(
@ -684,7 +684,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
"name-regex", cl::Optional,
cl::desc("Show code coverage only for functions that match the given "
"regular expression"),
cl::ZeroOrMore, cl::cat(FilteringCategory));
cl::cat(FilteringCategory));
cl::list<std::string> IgnoreFilenameRegexFilters(
"ignore-filename-regex", cl::Optional,

View File

@ -121,7 +121,7 @@ using namespace cl;
OptionCategory DwarfDumpCategory("Specific Options");
static list<std::string>
InputFilenames(Positional, desc("<input object files or .dSYM bundles>"),
ZeroOrMore, cat(DwarfDumpCategory));
cat(DwarfDumpCategory));
cl::OptionCategory SectionCategory("Section-specific Dump Options",
"These control which sections are dumped. "

View File

@ -88,8 +88,7 @@ static cl::list<std::string> ExtractBlocks(
" --bb=f:bb1;bb2 will extract one function with both bb1 and bb2;\n"
" --bb=f:bb1 --bb=f:bb2 will extract two functions, one with bb1, one "
"with bb2."),
cl::ZeroOrMore, cl::value_desc("function:bb1[;bb2...]"),
cl::cat(ExtractCat));
cl::value_desc("function:bb1[;bb2...]"), cl::cat(ExtractCat));
// ExtractAlias - The alias to extract from the module.
static cl::list<std::string>

View File

@ -65,7 +65,7 @@ static opt<bool> Verbose("verbose",
cat(GeneralOptions));
static list<std::string> InputFilenames(Positional, desc("<input GSYM files>"),
ZeroOrMore, cat(GeneralOptions));
cat(GeneralOptions));
static opt<std::string>
ConvertFilename("convert", cl::init(""),

View File

@ -122,7 +122,7 @@ static cl::list<std::string>
static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs,
cl::PositionalEatsArgs,
cl::cat(JITLinkCategory));
static cl::opt<bool>
@ -142,7 +142,7 @@ static cl::list<std::string> AbsoluteDefs(
static cl::list<std::string>
Aliases("alias", cl::desc("Inject symbol aliases (syntax: <name>=<addr>)"),
cl::ZeroOrMore, cl::cat(JITLinkCategory));
cl::cat(JITLinkCategory));
static cl::list<std::string> TestHarnesses("harness", cl::Positional,
cl::desc("Test harness files"),

View File

@ -78,7 +78,7 @@ static cl::list<std::string> Libraries(
"l<x> searches for the library libx.a in the library search path. If"
" the string 'x' ends with '.o', then the library 'x' is searched for"
" without prepending 'lib' or appending '.a'"),
cl::ZeroOrMore, cl::Prefix, cl::cat(LibtoolCategory));
cl::Prefix, cl::cat(LibtoolCategory));
static cl::list<std::string> LibrarySearchDirs(
"L",

View File

@ -215,7 +215,7 @@ static cl::list<std::string> ExportedSymbols(
static cl::list<std::string>
DSOSymbols("dso-symbol",
cl::desc("Symbol to put in the symtab in the resulting dso"),
cl::ZeroOrMore, cl::cat(LTOCategory));
cl::cat(LTOCategory));
static cl::opt<bool> ListSymbolsOnly(
"list-symbols-only", cl::init(false),

View File

@ -90,8 +90,7 @@ static cl::list<std::string> SymbolResolutions(
" runtime and is known to be in this linkage unit\n"
" x - externally visible: the definition of this symbol is\n"
" visible outside of the LTO unit\n"
"A resolution for each symbol must be specified."),
cl::ZeroOrMore);
"A resolution for each symbol must be specified"));
static cl::opt<std::string> OverrideTriple(
"override-triple",

View File

@ -319,12 +319,14 @@ cl::list<std::string>
ExcludeTypes("exclude-types",
cl::desc("Exclude types by regular expression"),
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> ExcludeSymbols(
"exclude-symbols", cl::desc("Exclude symbols by regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> ExcludeCompilands(
"exclude-compilands", cl::desc("Exclude compilands by regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string>
ExcludeSymbols("exclude-symbols",
cl::desc("Exclude symbols by regular expression"),
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string>
ExcludeCompilands("exclude-compilands",
cl::desc("Exclude compilands by regular expression"),
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> IncludeTypes(
"include-types",
@ -333,7 +335,7 @@ cl::list<std::string> IncludeTypes(
cl::list<std::string> IncludeSymbols(
"include-symbols",
cl::desc("Include only symbols which match a regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> IncludeCompilands(
"include-compilands",
cl::desc("Include only compilands those which match a regular expression"),
@ -418,7 +420,7 @@ cl::list<uint32_t> TypeIndex(
cl::CommaSeparated, cl::sub(BytesSubcommand), cl::cat(TypeCategory));
cl::list<uint32_t>
IdIndex("id", cl::desc("Dump the id record with the given type index"),
cl::ZeroOrMore, cl::CommaSeparated, cl::sub(BytesSubcommand),
cl::CommaSeparated, cl::sub(BytesSubcommand),
cl::cat(TypeCategory));
cl::opt<uint32_t> ModuleIndex(

View File

@ -83,7 +83,7 @@ static cl::list<std::string> Dylibs("dylib", cl::desc("Add library."),
static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs,
cl::PositionalEatsArgs,
cl::cat(RTDyldCategory));
static cl::opt<std::string>

View File

@ -64,8 +64,7 @@ public:
static StringRef ToolName;
static cl::list<std::string> InputFileNames(cl::Positional,
cl::desc("<input object files>"),
cl::ZeroOrMore);
cl::desc("<input object files>"));
static int MinLength = 4;
static bool PrintFileName;

View File

@ -192,10 +192,9 @@ static cl::opt<bool>
DisableSimplifyLibCalls("disable-simplify-libcalls",
cl::desc("Disable simplify-libcalls"));
static cl::list<std::string>
DisableBuiltins("disable-builtin",
cl::desc("Disable specific target library builtin function"),
cl::ZeroOrMore);
static cl::list<std::string> DisableBuiltins(
"disable-builtin",
cl::desc("Disable specific target library builtin function"));
static cl::opt<bool> EnableDebugify(
"enable-debugify",

View File

@ -1157,7 +1157,7 @@ TEST(CommandLineTest, PositionalEatArgsError) {
cl::PositionalEatsArgs);
StackOption<std::string, cl::list<std::string>> PosEatArgs2(
"positional-eat-args2", cl::Positional, cl::desc("Some strings"),
cl::ZeroOrMore, cl::PositionalEatsArgs);
cl::PositionalEatsArgs);
const char *args[] = {"prog", "-positional-eat-args=XXXX"};
const char *args2[] = {"prog", "-positional-eat-args=XXXX", "-foo"};

View File

@ -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));
//===----------------------------------------------------------------------===//

View File

@ -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",

View File

@ -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"),

View File

@ -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",

View File

@ -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");

View File

@ -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,

View File

@ -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,

View File

@ -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 {

View File

@ -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;

View File

@ -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",

View File

@ -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:

View File

@ -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",

View File

@ -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");