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

This commit is contained in:
Fangrui Song 2022-06-05 00:31:44 -07:00
parent 2c4d52467a
commit d86a206f06
68 changed files with 140 additions and 189 deletions

View File

@ -310,13 +310,12 @@ cl::desc("Only warn if #include directives are inside extern or namespace"
// Option for include paths for coverage check. // Option for include paths for coverage check.
static cl::list<std::string> static cl::list<std::string>
IncludePaths("I", cl::desc("Include path for coverage check."), IncludePaths("I", cl::desc("Include path for coverage check."),
cl::ZeroOrMore, cl::value_desc("path")); cl::value_desc("path"));
// Option for disabling the coverage check. // Option for disabling the coverage check.
static cl::opt<bool> static cl::opt<bool> NoCoverageCheck("no-coverage-check",
NoCoverageCheck("no-coverage-check", cl::init(false), cl::desc("Don't do the coverage check."));
cl::desc("Don't do the coverage check."));
// Option for just doing the coverage check. // Option for just doing the coverage check.
static cl::opt<bool> static cl::opt<bool>

View File

@ -70,9 +70,8 @@ using namespace clang;
using namespace CodeGen; using namespace CodeGen;
static llvm::cl::opt<bool> LimitedCoverage( static llvm::cl::opt<bool> LimitedCoverage(
"limited-coverage-experimental", llvm::cl::ZeroOrMore, llvm::cl::Hidden, "limited-coverage-experimental", llvm::cl::Hidden,
llvm::cl::desc("Emit limited coverage mapping information (experimental)"), llvm::cl::desc("Emit limited coverage mapping information (experimental)"));
llvm::cl::init(false));
static const char AnnotationSection[] = "llvm.metadata"; static const char AnnotationSection[] = "llvm.metadata";

View File

@ -23,7 +23,7 @@
#include "llvm/Support/MD5.h" #include "llvm/Support/MD5.h"
static llvm::cl::opt<bool> static llvm::cl::opt<bool>
EnableValueProfiling("enable-value-profiling", llvm::cl::ZeroOrMore, EnableValueProfiling("enable-value-profiling",
llvm::cl::desc("Enable value profiling"), llvm::cl::desc("Enable value profiling"),
llvm::cl::Hidden, llvm::cl::init(false)); llvm::cl::Hidden, llvm::cl::init(false));

View File

@ -43,7 +43,7 @@ static llvm::cl::opt<std::string> Expression(
llvm::cl::desc("Path to a file containing the expression to parse")); llvm::cl::desc("Path to a file containing the expression to parse"));
static llvm::cl::list<std::string> static llvm::cl::list<std::string>
Imports("import", llvm::cl::ZeroOrMore, Imports("import",
llvm::cl::desc("Path to a file containing declarations to import")); llvm::cl::desc("Path to a file containing declarations to import"));
static llvm::cl::opt<bool> static llvm::cl::opt<bool>
@ -56,7 +56,7 @@ static llvm::cl::opt<bool> UseOrigins(
"Use DeclContext origin information for more accurate lookups")); "Use DeclContext origin information for more accurate lookups"));
static llvm::cl::list<std::string> static llvm::cl::list<std::string>
ClangArgs("Xcc", llvm::cl::ZeroOrMore, ClangArgs("Xcc",
llvm::cl::desc("Argument to pass to the CompilerInvocation"), llvm::cl::desc("Argument to pass to the CompilerInvocation"),
llvm::cl::CommaSeparated); llvm::cl::CommaSeparated);

View File

@ -73,7 +73,7 @@ static cl::list<std::string>
cl::desc("[<input file>,...] (deprecated)"), cl::desc("[<input file>,...] (deprecated)"),
cl::cat(ClangOffloadBundlerCategory)); cl::cat(ClangOffloadBundlerCategory));
static cl::list<std::string> static cl::list<std::string>
OutputFileNames("output", cl::ZeroOrMore, OutputFileNames("output",
cl::desc("Output file." cl::desc("Output file."
" Can be specified multiple times " " Can be specified multiple times "
"for multiple output files."), "for multiple output files."),

View File

@ -68,7 +68,7 @@ static cl::OptionCategory ClangRenameOptions("clang-rename common options");
static cl::list<unsigned> SymbolOffsets( static cl::list<unsigned> SymbolOffsets(
"offset", "offset",
cl::desc("Locates the symbol by offset as opposed to <line>:<column>."), cl::desc("Locates the symbol by offset as opposed to <line>:<column>."),
cl::ZeroOrMore, cl::cat(ClangRenameOptions)); cl::cat(ClangRenameOptions));
static cl::opt<bool> Inplace("i", cl::desc("Overwrite edited <file>s."), static cl::opt<bool> Inplace("i", cl::desc("Overwrite edited <file>s."),
cl::cat(ClangRenameOptions)); cl::cat(ClangRenameOptions));
static cl::list<std::string> static cl::list<std::string>
@ -78,7 +78,7 @@ static cl::list<std::string>
static cl::list<std::string> static cl::list<std::string>
NewNames("new-name", cl::desc("The new name to change the symbol to."), NewNames("new-name", cl::desc("The new name to change the symbol to."),
cl::ZeroOrMore, cl::cat(ClangRenameOptions)); cl::cat(ClangRenameOptions));
static cl::opt<bool> PrintName( static cl::opt<bool> PrintName(
"pn", "pn",
cl::desc("Print the found symbol's name prior to renaming to stderr."), cl::desc("Print the found symbol's name prior to renaming to stderr."),

View File

@ -23,13 +23,12 @@
#include "llvm/Support/TargetSelect.h" // llvm::Initialize* #include "llvm/Support/TargetSelect.h" // llvm::Initialize*
static llvm::cl::list<std::string> static llvm::cl::list<std::string>
ClangArgs("Xcc", llvm::cl::ZeroOrMore, ClangArgs("Xcc",
llvm::cl::desc("Argument to pass to the CompilerInvocation"), llvm::cl::desc("Argument to pass to the CompilerInvocation"),
llvm::cl::CommaSeparated); llvm::cl::CommaSeparated);
static llvm::cl::opt<bool> OptHostSupportsJit("host-supports-jit", static llvm::cl::opt<bool> OptHostSupportsJit("host-supports-jit",
llvm::cl::Hidden); llvm::cl::Hidden);
static llvm::cl::list<std::string> OptInputs(llvm::cl::Positional, static llvm::cl::list<std::string> OptInputs(llvm::cl::Positional,
llvm::cl::ZeroOrMore,
llvm::cl::desc("[code to run]")); llvm::cl::desc("[code to run]"));
static void LLVMErrorHandler(void *UserData, const char *Message, static void LLVMErrorHandler(void *UserData, const char *Message,

View File

@ -22,7 +22,7 @@ static cl::list<std::string> InputFilenames(cl::Positional, cl::OneOrMore,
// User can filter the distributions to be taken into account. // User can filter the distributions to be taken into account.
static cl::list<std::string> static cl::list<std::string>
KeepOnlyDistributions("keep-only-distributions", cl::ZeroOrMore, KeepOnlyDistributions("keep-only-distributions",
cl::desc("<comma separated list of distribution " cl::desc("<comma separated list of distribution "
"names, keeps all if unspecified>")); "names, keeps all if unspecified>"));

View File

@ -39,7 +39,7 @@ static cl::list<std::string> InputFiles(cl::Positional, cl::OneOrMore,
static cl::list<std::string> InputArgv("args", cl::Positional, static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."), cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
// Initialize LLVM. // Initialize LLVM.

View File

@ -29,7 +29,7 @@ static cl::list<std::string> InputFiles(cl::Positional, cl::OneOrMore,
static cl::list<std::string> InputArgv("args", cl::Positional, static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."), cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
static cl::opt<unsigned> NumThreads("num-threads", cl::Optional, static cl::opt<unsigned> NumThreads("num-threads", cl::Optional,
cl::desc("Number of compile threads"), cl::desc("Number of compile threads"),

View File

@ -18,8 +18,8 @@
using namespace llvm; using namespace llvm;
static cl::opt<bool> DotOnly("dot-ddg-only", cl::init(false), cl::Hidden, static cl::opt<bool> DotOnly("dot-ddg-only", cl::Hidden,
cl::ZeroOrMore, cl::desc("simple ddg dot graph")); cl::desc("simple ddg dot graph"));
static cl::opt<std::string> DDGDotFilenamePrefix( static cl::opt<std::string> DDGDotFilenamePrefix(
"dot-ddg-filename-prefix", cl::init("ddg"), cl::Hidden, "dot-ddg-filename-prefix", cl::init("ddg"), cl::Hidden,
cl::desc("The prefix used for the DDG dot file names.")); cl::desc("The prefix used for the DDG dot file names."));

View File

@ -109,8 +109,7 @@ static cl::opt<bool>
Delinearize("da-delinearize", cl::init(true), cl::Hidden, Delinearize("da-delinearize", cl::init(true), cl::Hidden,
cl::desc("Try to delinearize array references.")); cl::desc("Try to delinearize array references."));
static cl::opt<bool> DisableDelinearizationChecks( static cl::opt<bool> DisableDelinearizationChecks(
"da-disable-delinearization-checks", cl::init(false), cl::Hidden, "da-disable-delinearization-checks", cl::Hidden,
cl::ZeroOrMore,
cl::desc( cl::desc(
"Disable checks that try to statically verify validity of " "Disable checks that try to statically verify validity of "
"delinearized subscripts. Enabling this option may result in incorrect " "delinearized subscripts. Enabling this option may result in incorrect "

View File

@ -51,7 +51,6 @@ STATISTIC(NumCallsAnalyzed, "Number of call sites analyzed");
static cl::opt<int> static cl::opt<int>
DefaultThreshold("inlinedefault-threshold", cl::Hidden, cl::init(225), DefaultThreshold("inlinedefault-threshold", cl::Hidden, cl::init(225),
cl::ZeroOrMore,
cl::desc("Default amount of inlining to perform")); cl::desc("Default amount of inlining to perform"));
// We introduce this option since there is a minor compile-time win by avoiding // We introduce this option since there is a minor compile-time win by avoiding
@ -91,7 +90,6 @@ static cl::opt<int> InlineSavingsMultiplier(
static cl::opt<int> static cl::opt<int>
InlineSizeAllowance("inline-size-allowance", cl::Hidden, cl::init(100), InlineSizeAllowance("inline-size-allowance", cl::Hidden, cl::init(100),
cl::ZeroOrMore,
cl::desc("The maximum size of a callee that get's " cl::desc("The maximum size of a callee that get's "
"inlined without sufficient cycle savings")); "inlined without sufficient cycle savings"));
@ -104,7 +102,6 @@ static cl::opt<int> ColdThreshold(
static cl::opt<int> static cl::opt<int>
HotCallSiteThreshold("hot-callsite-threshold", cl::Hidden, cl::init(3000), HotCallSiteThreshold("hot-callsite-threshold", cl::Hidden, cl::init(3000),
cl::ZeroOrMore,
cl::desc("Threshold for hot callsites ")); cl::desc("Threshold for hot callsites "));
static cl::opt<int> LocallyHotCallSiteThreshold( static cl::opt<int> LocallyHotCallSiteThreshold(
@ -134,7 +131,6 @@ static cl::opt<bool> OptComputeFullInlineCost(
static cl::opt<bool> InlineCallerSupersetNoBuiltin( static cl::opt<bool> InlineCallerSupersetNoBuiltin(
"inline-caller-superset-nobuiltin", cl::Hidden, cl::init(true), "inline-caller-superset-nobuiltin", cl::Hidden, cl::init(true),
cl::ZeroOrMore,
cl::desc("Allow inlining when caller has a superset of callee's nobuiltin " cl::desc("Allow inlining when caller has a superset of callee's nobuiltin "
"attributes.")); "attributes."));

View File

@ -149,12 +149,11 @@ bool llvm::VerifySCEV = false;
#endif #endif
static cl::opt<unsigned> static cl::opt<unsigned>
MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden, MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden,
cl::ZeroOrMore, cl::desc("Maximum number of iterations SCEV will "
cl::desc("Maximum number of iterations SCEV will " "symbolically execute a constant "
"symbolically execute a constant " "derived loop"),
"derived loop"), cl::init(100));
cl::init(100));
static cl::opt<bool, true> VerifySCEVOpt( static cl::opt<bool, true> VerifySCEVOpt(
"verify-scev", cl::Hidden, cl::location(VerifySCEV), "verify-scev", cl::Hidden, cl::location(VerifySCEV),

View File

@ -177,8 +177,7 @@ static cl::opt<bool> ProfileGuidedSectionPrefix(
cl::desc("Use profile info to add section prefix for hot/cold functions")); cl::desc("Use profile info to add section prefix for hot/cold functions"));
static cl::opt<bool> ProfileUnknownInSpecialSection( static cl::opt<bool> ProfileUnknownInSpecialSection(
"profile-unknown-in-special-section", cl::Hidden, cl::init(false), "profile-unknown-in-special-section", cl::Hidden,
cl::ZeroOrMore,
cl::desc("In profiling mode like sampleFDO, if a function doesn't have " cl::desc("In profiling mode like sampleFDO, if a function doesn't have "
"profile, we cannot tell the function is cold for sure because " "profile, we cannot tell the function is cold for sure because "
"it may be a function newly added without ever being sampled. " "it may be a function newly added without ever being sampled. "

View File

@ -109,7 +109,6 @@ STATISTIC(NumFailLargeMaxStage, "Pipeliner abort due to too many stages");
/// A command line option to turn software pipelining on or off. /// A command line option to turn software pipelining on or off.
static cl::opt<bool> EnableSWP("enable-pipeliner", cl::Hidden, cl::init(true), static cl::opt<bool> EnableSWP("enable-pipeliner", cl::Hidden, cl::init(true),
cl::ZeroOrMore,
cl::desc("Enable Software Pipelining")); cl::desc("Enable Software Pipelining"));
/// A command line option to enable SWP at -Os. /// A command line option to enable SWP at -Os.

View File

@ -61,9 +61,9 @@ using namespace llvm;
#define DEBUG_TYPE "machine-scheduler" #define DEBUG_TYPE "machine-scheduler"
static cl::opt<bool> EnableAASchedMI("enable-aa-sched-mi", cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::init(false), EnableAASchedMI("enable-aa-sched-mi", cl::Hidden,
cl::desc("Enable use of AA during MI DAG construction")); cl::desc("Enable use of AA during MI DAG construction"));
static cl::opt<bool> UseTBAA("use-tbaa-in-sched-mi", cl::Hidden, static cl::opt<bool> UseTBAA("use-tbaa-in-sched-mi", cl::Hidden,
cl::init(true), cl::desc("Enable use of TBAA during MI DAG construction")); cl::init(true), cl::desc("Enable use of TBAA during MI DAG construction"));

View File

@ -32,9 +32,9 @@ using namespace llvm;
#define DEBUG_TYPE "scheduler" #define DEBUG_TYPE "scheduler"
static cl::opt<bool> DisableDFASched("disable-dfa-sched", cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::init(false), DisableDFASched("disable-dfa-sched", cl::Hidden,
cl::desc("Disable use of DFA during scheduling")); cl::desc("Disable use of DFA during scheduling"));
static cl::opt<int> RegPressureThreshold( static cl::opt<int> RegPressureThreshold(
"dfa-sched-reg-pressure-threshold", cl::Hidden, cl::init(5), "dfa-sched-reg-pressure-threshold", cl::Hidden, cl::init(5),

View File

@ -42,7 +42,7 @@ using namespace llvm;
#define DEBUG_TYPE "machine-scheduler" #define DEBUG_TYPE "machine-scheduler"
static cl::opt<bool> IgnoreBBRegPressure("ignore-bb-reg-pressure", cl::Hidden, static cl::opt<bool> IgnoreBBRegPressure("ignore-bb-reg-pressure", cl::Hidden,
cl::ZeroOrMore, cl::init(false)); cl::init(false));
static cl::opt<bool> UseNewerCandidate("use-newer-candidate", cl::Hidden, static cl::opt<bool> UseNewerCandidate("use-newer-candidate", cl::Hidden,
cl::ZeroOrMore, cl::init(true)); cl::ZeroOrMore, cl::init(true));
@ -53,7 +53,7 @@ static cl::opt<unsigned> SchedDebugVerboseLevel("misched-verbose-level",
// Check if the scheduler should penalize instructions that are available to // Check if the scheduler should penalize instructions that are available to
// early due to a zero-latency dependence. // early due to a zero-latency dependence.
static cl::opt<bool> CheckEarlyAvail("check-early-avail", cl::Hidden, static cl::opt<bool> CheckEarlyAvail("check-early-avail", cl::Hidden,
cl::ZeroOrMore, cl::init(true)); cl::init(true));
// This value is used to determine if a register class is a high pressure set. // This value is used to determine if a register class is a high pressure set.
// We compute the maximum number of registers needed and divided by the total // We compute the maximum number of registers needed and divided by the total

View File

@ -165,7 +165,7 @@ static cl::opt<bool> PerformMandatoryInliningsFirst(
static cl::opt<bool> EnableO3NonTrivialUnswitching( static cl::opt<bool> EnableO3NonTrivialUnswitching(
"enable-npm-O3-nontrivial-unswitch", cl::init(true), cl::Hidden, "enable-npm-O3-nontrivial-unswitch", cl::init(true), cl::Hidden,
cl::ZeroOrMore, cl::desc("Enable non-trivial loop unswitching for -O3")); cl::desc("Enable non-trivial loop unswitching for -O3"));
static cl::opt<bool> EnableEagerlyInvalidateAnalyses( static cl::opt<bool> EnableEagerlyInvalidateAnalyses(
"eagerly-invalidate-analyses", cl::init(true), cl::Hidden, "eagerly-invalidate-analyses", cl::init(true), cl::Hidden,

View File

@ -50,7 +50,6 @@ cl::opt<UncheckedLdStMode> ClUncheckedLdSt(
static cl::opt<bool> static cl::opt<bool>
ClFirstSlot("stack-tagging-first-slot-opt", cl::Hidden, cl::init(true), ClFirstSlot("stack-tagging-first-slot-opt", cl::Hidden, cl::init(true),
cl::ZeroOrMore,
cl::desc("Apply first slot optimization for stack tagging " cl::desc("Apply first slot optimization for stack tagging "
"(eliminate ADDG Rt, Rn, 0, 0).")); "(eliminate ADDG Rt, Rn, 0, 0)."));

View File

@ -57,12 +57,11 @@ enum ITMode {
}; };
static cl::opt<ITMode> static cl::opt<ITMode>
IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT),
cl::ZeroOrMore, cl::values(clEnumValN(DefaultIT, "arm-default-it",
cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate any type of IT block"),
"Generate any type of IT block"), clEnumValN(RestrictedIT, "arm-restrict-it",
clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow complex IT blocks")));
"Disallow complex IT blocks")));
/// ForceFastISel - Use the fast-isel, even for subtargets where it is not /// ForceFastISel - Use the fast-isel, even for subtargets where it is not
/// currently supported (for testing only). /// currently supported (for testing only).

View File

@ -61,8 +61,7 @@ static cl::opt<int> DbgNVJCount("nvj-count", cl::init(-1), cl::Hidden,
"New Value Jump")); "New Value Jump"));
static cl::opt<bool> DisableNewValueJumps("disable-nvjump", cl::Hidden, static cl::opt<bool> DisableNewValueJumps("disable-nvjump", cl::Hidden,
cl::ZeroOrMore, cl::init(false), cl::desc("Disable New Value Jumps"));
cl::desc("Disable New Value Jumps"));
namespace llvm { namespace llvm {

View File

@ -50,8 +50,9 @@ static cl::opt<bool>
DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden, DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden,
cl::desc("Disable Hexagon CFG Optimization")); cl::desc("Disable Hexagon CFG Optimization"));
static cl::opt<bool> DisableHCP("disable-hcp", cl::init(false), cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::desc("Disable Hexagon constant propagation")); DisableHCP("disable-hcp", cl::Hidden,
cl::desc("Disable Hexagon constant propagation"));
static cl::opt<bool> DisableStoreWidening("disable-store-widen", static cl::opt<bool> DisableStoreWidening("disable-store-widen",
cl::Hidden, cl::init(false), cl::desc("Disable store widening")); cl::Hidden, cl::init(false), cl::desc("Disable store widening"));
@ -61,7 +62,7 @@ static cl::opt<bool> EnableExpandCondsets("hexagon-expand-condsets",
cl::desc("Early expansion of MUX")); cl::desc("Early expansion of MUX"));
static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden, static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden,
cl::ZeroOrMore, cl::desc("Enable early if-conversion")); cl::desc("Enable early if-conversion"));
static cl::opt<bool> EnableGenInsert("hexagon-insert", cl::init(true), static cl::opt<bool> EnableGenInsert("hexagon-insert", cl::init(true),
cl::Hidden, cl::desc("Generate \"insert\" instructions")); cl::Hidden, cl::desc("Generate \"insert\" instructions"));
@ -100,18 +101,20 @@ static cl::opt<bool>
EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden, EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden,
cl::desc("Enable Hexagon Vector print instr pass")); cl::desc("Enable Hexagon Vector print instr pass"));
static cl::opt<bool> EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::init(true), cl::desc("Enable vextract optimization")); EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden, cl::init(true),
cl::desc("Enable vextract optimization"));
static cl::opt<bool> EnableVectorCombine("hexagon-vector-combine", cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::init(true), cl::desc("Enable HVX vector combining")); EnableVectorCombine("hexagon-vector-combine", cl::Hidden, cl::init(true),
cl::desc("Enable HVX vector combining"));
static cl::opt<bool> EnableInitialCFGCleanup( static cl::opt<bool> EnableInitialCFGCleanup(
"hexagon-initial-cfg-cleanup", cl::Hidden, cl::init(true), "hexagon-initial-cfg-cleanup", cl::Hidden, cl::init(true),
cl::desc("Simplify the CFG after atomic expansion pass")); cl::desc("Simplify the CFG after atomic expansion pass"));
static cl::opt<bool> EnableInstSimplify("hexagon-instsimplify", cl::Hidden, static cl::opt<bool> EnableInstSimplify("hexagon-instsimplify", cl::Hidden,
cl::ZeroOrMore, cl::init(true), cl::init(true),
cl::desc("Enable instsimplify")); cl::desc("Enable instsimplify"));
/// HexagonTargetMachineModule - Note that this is used on hosts that /// HexagonTargetMachineModule - Note that this is used on hosts that

View File

@ -55,17 +55,17 @@ using namespace llvm;
#define DEBUG_TYPE "packets" #define DEBUG_TYPE "packets"
static cl::opt<bool> DisablePacketizer("disable-packetizer", cl::Hidden, static cl::opt<bool>
cl::ZeroOrMore, cl::init(false), DisablePacketizer("disable-packetizer", cl::Hidden,
cl::desc("Disable Hexagon packetizer pass")); cl::desc("Disable Hexagon packetizer pass"));
static cl::opt<bool> Slot1Store("slot1-store-slot0-load", cl::Hidden, static cl::opt<bool> Slot1Store("slot1-store-slot0-load", cl::Hidden,
cl::ZeroOrMore, cl::init(true), cl::init(true),
cl::desc("Allow slot1 store and slot0 load")); cl::desc("Allow slot1 store and slot0 load"));
static cl::opt<bool> PacketizeVolatiles("hexagon-packetize-volatiles", static cl::opt<bool> PacketizeVolatiles(
cl::ZeroOrMore, cl::Hidden, cl::init(true), "hexagon-packetize-volatiles", cl::Hidden, cl::init(true),
cl::desc("Allow non-solo packetization of volatile memory references")); cl::desc("Allow non-solo packetization of volatile memory references"));
static cl::opt<bool> static cl::opt<bool>
EnableGenAllInsnClass("enable-gen-insn", cl::Hidden, EnableGenAllInsnClass("enable-gen-insn", cl::Hidden,

View File

@ -117,7 +117,6 @@ using namespace llvm;
static cl::opt<unsigned> static cl::opt<unsigned>
MaxVarsPrep("ppc-formprep-max-vars", cl::Hidden, cl::init(24), MaxVarsPrep("ppc-formprep-max-vars", cl::Hidden, cl::init(24),
cl::ZeroOrMore,
cl::desc("Potential common base number threshold per function " cl::desc("Potential common base number threshold per function "
"for PPC loop prep")); "for PPC loop prep"));

View File

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

View File

@ -99,8 +99,8 @@ static cl::opt<bool>
EnablePerformThinLTO("perform-thinlto", cl::init(false), cl::Hidden, EnablePerformThinLTO("perform-thinlto", cl::init(false), cl::Hidden,
cl::desc("Enable performing ThinLTO.")); cl::desc("Enable performing ThinLTO."));
cl::opt<bool> EnableHotColdSplit("hot-cold-split", cl::init(false), cl::opt<bool> EnableHotColdSplit("hot-cold-split",
cl::ZeroOrMore, cl::desc("Enable hot-cold splitting pass")); cl::desc("Enable hot-cold splitting pass"));
cl::opt<bool> EnableIROutliner("ir-outliner", cl::init(false), cl::Hidden, cl::opt<bool> EnableIROutliner("ir-outliner", cl::init(false), cl::Hidden,
cl::desc("Enable ir outliner pass")); cl::desc("Enable ir outliner pass"));

View File

@ -284,7 +284,6 @@ static cl::opt<CallSiteFormat::Format> ProfileInlineReplayFormat(
static cl::opt<unsigned> static cl::opt<unsigned>
MaxNumPromotions("sample-profile-icp-max-prom", cl::init(3), cl::Hidden, MaxNumPromotions("sample-profile-icp-max-prom", cl::init(3), cl::Hidden,
cl::ZeroOrMore,
cl::desc("Max number of promotions for a single indirect " cl::desc("Max number of promotions for a single indirect "
"call callsite in sample profile loader")); "call callsite in sample profile loader"));

View File

@ -42,7 +42,6 @@ using ProfileCount = Function::ProfileCount;
namespace llvm { namespace llvm {
cl::opt<int> cl::opt<int>
InitialSyntheticCount("initial-synthetic-count", cl::Hidden, cl::init(10), InitialSyntheticCount("initial-synthetic-count", cl::Hidden, cl::init(10),
cl::ZeroOrMore,
cl::desc("Initial value of synthetic entry count")); cl::desc("Initial value of synthetic entry count"));
} // namespace llvm } // namespace llvm

View File

@ -163,8 +163,7 @@ static cl::opt<bool>
/// Provide a way to force disable whole program for debugging or workarounds, /// Provide a way to force disable whole program for debugging or workarounds,
/// when enabled via the linker. /// when enabled via the linker.
static cl::opt<bool> DisableWholeProgramVisibility( static cl::opt<bool> DisableWholeProgramVisibility(
"disable-whole-program-visibility", cl::init(false), cl::Hidden, "disable-whole-program-visibility", cl::Hidden,
cl::ZeroOrMore,
cl::desc("Disable whole program visibility (overrides enabling options)")); cl::desc("Disable whole program visibility (overrides enabling options)"));
/// Provide way to prevent certain function from being devirtualized /// Provide way to prevent certain function from being devirtualized

View File

@ -124,27 +124,27 @@ cl::opt<unsigned> MaxNumOfPromotionsPerLoop(
// A debug option // A debug option
cl::opt<int> cl::opt<int>
MaxNumOfPromotions(cl::ZeroOrMore, "max-counter-promotions", cl::init(-1), MaxNumOfPromotions("max-counter-promotions", cl::init(-1),
cl::desc("Max number of allowed counter promotions")); cl::desc("Max number of allowed counter promotions"));
cl::opt<unsigned> SpeculativeCounterPromotionMaxExiting( cl::opt<unsigned> SpeculativeCounterPromotionMaxExiting(
cl::ZeroOrMore, "speculative-counter-promotion-max-exiting", cl::init(3), "speculative-counter-promotion-max-exiting", cl::init(3),
cl::desc("The max number of exiting blocks of a loop to allow " cl::desc("The max number of exiting blocks of a loop to allow "
" speculative counter promotion")); " speculative counter promotion"));
cl::opt<bool> SpeculativeCounterPromotionToLoop( cl::opt<bool> SpeculativeCounterPromotionToLoop(
cl::ZeroOrMore, "speculative-counter-promotion-to-loop", cl::init(false), "speculative-counter-promotion-to-loop",
cl::desc("When the option is false, if the target block is in a loop, " cl::desc("When the option is false, if the target block is in a loop, "
"the promotion will be disallowed unless the promoted counter " "the promotion will be disallowed unless the promoted counter "
" update can be further/iteratively promoted into an acyclic " " update can be further/iteratively promoted into an acyclic "
" region.")); " region."));
cl::opt<bool> IterativeCounterPromotion( cl::opt<bool> IterativeCounterPromotion(
cl::ZeroOrMore, "iterative-counter-promotion", cl::init(true), "iterative-counter-promotion", cl::init(true),
cl::desc("Allow counter promotion across the whole loop nest.")); cl::desc("Allow counter promotion across the whole loop nest."));
cl::opt<bool> SkipRetExitBlock( cl::opt<bool> SkipRetExitBlock(
cl::ZeroOrMore, "skip-ret-exit-block", cl::init(true), "skip-ret-exit-block", cl::init(true),
cl::desc("Suppress counter promotion if exit blocks contain ret.")); cl::desc("Suppress counter promotion if exit blocks contain ret."));
class InstrProfilingLegacyPass : public ModulePass { class InstrProfilingLegacyPass : public ModulePass {

View File

@ -75,7 +75,6 @@ static cl::opt<unsigned>
// Maximum number of versions for optimizing memory intrinsic call. // Maximum number of versions for optimizing memory intrinsic call.
static cl::opt<unsigned> static cl::opt<unsigned>
MemOPMaxVersion("pgo-memop-max-version", cl::init(3), cl::Hidden, MemOPMaxVersion("pgo-memop-max-version", cl::init(3), cl::Hidden,
cl::ZeroOrMore,
cl::desc("The max version for the optimized memory " cl::desc("The max version for the optimized memory "
" intrinsic calls")); " intrinsic calls"));

View File

@ -64,8 +64,7 @@ using namespace llvm;
#define DEBUG_TYPE "memcpyopt" #define DEBUG_TYPE "memcpyopt"
static cl::opt<bool> EnableMemCpyOptWithoutLibcalls( static cl::opt<bool> EnableMemCpyOptWithoutLibcalls(
"enable-memcpyopt-without-libcalls", cl::init(false), cl::Hidden, "enable-memcpyopt-without-libcalls", cl::Hidden,
cl::ZeroOrMore,
cl::desc("Enable memcpyopt even when libcalls are disabled")); cl::desc("Enable memcpyopt even when libcalls are disabled"));
STATISTIC(NumMemCpyInstr, "Number of memcpy instructions deleted"); STATISTIC(NumMemCpyInstr, "Number of memcpy instructions deleted");

View File

@ -83,7 +83,6 @@ static cl::opt<bool> EnableNonTrivialUnswitch(
static cl::opt<int> static cl::opt<int>
UnswitchThreshold("unswitch-threshold", cl::init(50), cl::Hidden, UnswitchThreshold("unswitch-threshold", cl::init(50), cl::Hidden,
cl::ZeroOrMore,
cl::desc("The cost threshold for unswitching a loop.")); cl::desc("The cost threshold for unswitching a loop."));
static cl::opt<bool> EnableUnswitchCostMultiplier( static cl::opt<bool> EnableUnswitchCostMultiplier(

View File

@ -84,7 +84,7 @@ EnableNoAliasConversion("enable-noalias-to-md-conversion", cl::init(true),
static cl::opt<bool> static cl::opt<bool>
UseNoAliasIntrinsic("use-noalias-intrinsic-during-inlining", cl::Hidden, UseNoAliasIntrinsic("use-noalias-intrinsic-during-inlining", cl::Hidden,
cl::ZeroOrMore, cl::init(true), cl::init(true),
cl::desc("Use the llvm.experimental.noalias.scope.decl " cl::desc("Use the llvm.experimental.noalias.scope.decl "
"intrinsic during inlining.")); "intrinsic during inlining."));

View File

@ -28,7 +28,6 @@ namespace {
static cl::opt<bool> SampleProfileEvenCountDistribution( static cl::opt<bool> SampleProfileEvenCountDistribution(
"sample-profile-even-count-distribution", cl::init(true), cl::Hidden, "sample-profile-even-count-distribution", cl::init(true), cl::Hidden,
cl::ZeroOrMore,
cl::desc("Try to evenly distribute counts when there are multiple equally " cl::desc("Try to evenly distribute counts when there are multiple equally "
"likely options.")); "likely options."));
@ -46,17 +45,14 @@ static cl::opt<unsigned> SampleProfileProfiCostDec(
static cl::opt<unsigned> SampleProfileProfiCostIncZero( static cl::opt<unsigned> SampleProfileProfiCostIncZero(
"sample-profile-profi-cost-inc-zero", cl::init(11), cl::Hidden, "sample-profile-profi-cost-inc-zero", cl::init(11), cl::Hidden,
cl::ZeroOrMore,
cl::desc("A cost of increasing a count of zero-weight block by one.")); cl::desc("A cost of increasing a count of zero-weight block by one."));
static cl::opt<unsigned> SampleProfileProfiCostIncEntry( static cl::opt<unsigned> SampleProfileProfiCostIncEntry(
"sample-profile-profi-cost-inc-entry", cl::init(40), cl::Hidden, "sample-profile-profi-cost-inc-entry", cl::init(40), cl::Hidden,
cl::ZeroOrMore,
cl::desc("A cost of increasing the entry block's count by one.")); cl::desc("A cost of increasing the entry block's count by one."));
static cl::opt<unsigned> SampleProfileProfiCostDecEntry( static cl::opt<unsigned> SampleProfileProfiCostDecEntry(
"sample-profile-profi-cost-dec-entry", cl::init(10), cl::Hidden, "sample-profile-profi-cost-dec-entry", cl::init(10), cl::Hidden,
cl::ZeroOrMore,
cl::desc("A cost of decreasing the entry block's count by one.")); cl::desc("A cost of decreasing the entry block's count by one."));
/// A value indicating an infinite flow/capacity/weight of a block/edge. /// A value indicating an infinite flow/capacity/weight of a block/edge.

View File

@ -44,7 +44,7 @@ cl::opt<bool> SampleProfileUseProfi(
cl::opt<bool> SampleProfileInferEntryCount( cl::opt<bool> SampleProfileInferEntryCount(
"sample-profile-infer-entry-count", cl::init(true), cl::Hidden, "sample-profile-infer-entry-count", cl::init(true), cl::Hidden,
cl::ZeroOrMore, cl::desc("Use profi to infer function entry count.")); cl::desc("Use profi to infer function entry count."));
namespace sampleprofutil { namespace sampleprofutil {

View File

@ -105,7 +105,7 @@ namespace llvm {
// program being debugged. // program being debugged.
cl::list<std::string> InputArgv("args", cl::Positional, cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."), cl::desc("<program arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
cl::opt<std::string> cl::opt<std::string>
OutputPrefix("output-prefix", cl::init("bugpoint"), OutputPrefix("output-prefix", cl::init("bugpoint"),
@ -126,7 +126,7 @@ cl::opt<std::string> CCBinary("gcc", cl::init(""),
cl::list<std::string> CCToolArgv("gcc-tool-args", cl::Positional, cl::list<std::string> CCToolArgv("gcc-tool-args", cl::Positional,
cl::desc("<gcc-tool arguments>..."), cl::desc("<gcc-tool arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
} }
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//

View File

@ -117,7 +117,7 @@ cl::opt<bool> SilencePasses(
static cl::list<std::string> OptArgs("opt-args", cl::Positional, static cl::list<std::string> OptArgs("opt-args", cl::Positional,
cl::desc("<opt arguments>..."), cl::desc("<opt arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
/// runPasses - Run the specified passes on Program, outputting a bitcode file /// runPasses - Run the specified passes on Program, outputting a bitcode file
/// and writing the filename into OutputFile if successful. If the /// and writing the filename into OutputFile if successful. If the

View File

@ -118,12 +118,10 @@ static cl::opt<bool>
// Determine optimization level. // Determine optimization level.
static cl::opt<char> static cl::opt<char>
OptLevel("O", OptLevel("O",
cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
"(default = '-O2')"), "(default = '-O2')"),
cl::Prefix, cl::Prefix, cl::init(' '));
cl::ZeroOrMore,
cl::init(' '));
static cl::opt<std::string> static cl::opt<std::string>
TargetTriple("mtriple", cl::desc("Override target triple for module")); TargetTriple("mtriple", cl::desc("Override target triple for module"));

View File

@ -166,13 +166,10 @@ namespace {
cl::value_desc("filename"), cl::init("")); cl::value_desc("filename"), cl::init(""));
// Determine optimization level. // Determine optimization level.
cl::opt<char> cl::opt<char> OptLevel("O",
OptLevel("O", cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " "(default = '-O2')"),
"(default = '-O2')"), cl::Prefix, cl::init(' '));
cl::Prefix,
cl::ZeroOrMore,
cl::init(' '));
cl::opt<std::string> cl::opt<std::string>
TargetTriple("mtriple", cl::desc("Override target triple for module")); TargetTriple("mtriple", cl::desc("Override target triple for module"));

View File

@ -665,7 +665,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
cl::list<std::string> NameFilters( cl::list<std::string> NameFilters(
"name", cl::Optional, "name", cl::Optional,
cl::desc("Show code coverage only for functions with the given name"), cl::desc("Show code coverage only for functions with the given name"),
cl::ZeroOrMore, cl::cat(FilteringCategory)); cl::cat(FilteringCategory));
cl::list<std::string> NameFilterFiles( cl::list<std::string> NameFilterFiles(
"name-allowlist", cl::Optional, "name-allowlist", cl::Optional,
@ -678,7 +678,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
"name-whitelist", cl::Optional, cl::Hidden, "name-whitelist", cl::Optional, cl::Hidden,
cl::desc("Show code coverage only for functions listed in the given " cl::desc("Show code coverage only for functions listed in the given "
"file. Deprecated, use -name-allowlist instead"), "file. Deprecated, use -name-allowlist instead"),
cl::ZeroOrMore, cl::cat(FilteringCategory)); cl::cat(FilteringCategory));
cl::list<std::string> NameRegexFilters( cl::list<std::string> NameRegexFilters(
"name-regex", cl::Optional, "name-regex", cl::Optional,
@ -690,7 +690,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
"ignore-filename-regex", cl::Optional, "ignore-filename-regex", cl::Optional,
cl::desc("Skip source code files with file paths that match the given " cl::desc("Skip source code files with file paths that match the given "
"regular expression"), "regular expression"),
cl::ZeroOrMore, cl::cat(FilteringCategory)); cl::cat(FilteringCategory));
cl::opt<double> RegionCoverageLtFilter( cl::opt<double> RegionCoverageLtFilter(
"region-coverage-lt", cl::Optional, "region-coverage-lt", cl::Optional,

View File

@ -36,7 +36,7 @@ namespace opts {
cl::OptionCategory CXXDumpCategory("CXX Dump Options"); cl::OptionCategory CXXDumpCategory("CXX Dump Options");
cl::list<std::string> InputFilenames(cl::Positional, cl::list<std::string> InputFilenames(cl::Positional,
cl::desc("<input object files>"), cl::desc("<input object files>"),
cl::ZeroOrMore, cl::cat(CXXDumpCategory)); cl::cat(CXXDumpCategory));
} // namespace opts } // namespace opts
namespace llvm { namespace llvm {

View File

@ -40,8 +40,9 @@ static cl::list<std::string>
InputFiles(cl::Positional, cl::desc("<input files>"), cl::cat(DwpCategory)); InputFiles(cl::Positional, cl::desc("<input files>"), cl::cat(DwpCategory));
static cl::list<std::string> ExecFilenames( static cl::list<std::string> ExecFilenames(
"e", cl::ZeroOrMore, "e",
cl::desc("Specify the executable/library files to get the list of *.dwo from"), cl::desc(
"Specify the executable/library files to get the list of *.dwo from"),
cl::value_desc("filename"), cl::cat(DwpCategory)); cl::value_desc("filename"), cl::cat(DwpCategory));
static cl::opt<std::string> OutputFilename(cl::Required, "o", static cl::opt<std::string> OutputFilename(cl::Required, "o",

View File

@ -66,8 +66,7 @@ static cl::opt<bool>
// ExtractFuncs - The functions to extract from the module. // ExtractFuncs - The functions to extract from the module.
static cl::list<std::string> static cl::list<std::string>
ExtractFuncs("func", cl::desc("Specify function to extract"), ExtractFuncs("func", cl::desc("Specify function to extract"),
cl::ZeroOrMore, cl::value_desc("function"), cl::value_desc("function"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
// ExtractRegExpFuncs - The functions, matched via regular expression, to // ExtractRegExpFuncs - The functions, matched via regular expression, to
// extract from the module. // extract from the module.
@ -75,8 +74,7 @@ static cl::list<std::string>
ExtractRegExpFuncs("rfunc", ExtractRegExpFuncs("rfunc",
cl::desc("Specify function(s) to extract using a " cl::desc("Specify function(s) to extract using a "
"regular expression"), "regular expression"),
cl::ZeroOrMore, cl::value_desc("rfunction"), cl::value_desc("rfunction"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
// ExtractBlocks - The blocks to extract from the module. // ExtractBlocks - The blocks to extract from the module.
static cl::list<std::string> ExtractBlocks( static cl::list<std::string> ExtractBlocks(
@ -96,8 +94,7 @@ static cl::list<std::string> ExtractBlocks(
// ExtractAlias - The alias to extract from the module. // ExtractAlias - The alias to extract from the module.
static cl::list<std::string> static cl::list<std::string>
ExtractAliases("alias", cl::desc("Specify alias to extract"), ExtractAliases("alias", cl::desc("Specify alias to extract"),
cl::ZeroOrMore, cl::value_desc("alias"), cl::value_desc("alias"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
// ExtractRegExpAliases - The aliases, matched via regular expression, to // ExtractRegExpAliases - The aliases, matched via regular expression, to
// extract from the module. // extract from the module.
@ -105,14 +102,12 @@ static cl::list<std::string>
ExtractRegExpAliases("ralias", ExtractRegExpAliases("ralias",
cl::desc("Specify alias(es) to extract using a " cl::desc("Specify alias(es) to extract using a "
"regular expression"), "regular expression"),
cl::ZeroOrMore, cl::value_desc("ralias"), cl::value_desc("ralias"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
// ExtractGlobals - The globals to extract from the module. // ExtractGlobals - The globals to extract from the module.
static cl::list<std::string> static cl::list<std::string>
ExtractGlobals("glob", cl::desc("Specify global to extract"), ExtractGlobals("glob", cl::desc("Specify global to extract"),
cl::ZeroOrMore, cl::value_desc("global"), cl::value_desc("global"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
// ExtractRegExpGlobals - The globals, matched via regular expression, to // ExtractRegExpGlobals - The globals, matched via regular expression, to
// extract from the module... // extract from the module...
@ -120,8 +115,7 @@ static cl::list<std::string>
ExtractRegExpGlobals("rglob", ExtractRegExpGlobals("rglob",
cl::desc("Specify global(s) to extract using a " cl::desc("Specify global(s) to extract using a "
"regular expression"), "regular expression"),
cl::ZeroOrMore, cl::value_desc("rglobal"), cl::value_desc("rglobal"), cl::cat(ExtractCat));
cl::cat(ExtractCat));
static cl::opt<bool> OutputAssembly("S", static cl::opt<bool> OutputAssembly("S",
cl::desc("Write output as LLVM assembly"), cl::desc("Write output as LLVM assembly"),

View File

@ -39,12 +39,10 @@ using namespace llvm;
static codegen::RegisterCodeGenFlags CGF; static codegen::RegisterCodeGenFlags CGF;
static cl::opt<char> static cl::opt<char>
OptLevel("O", OptLevel("O",
cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
"(default = '-O2')"), "(default = '-O2')"),
cl::Prefix, cl::Prefix, cl::init(' '));
cl::ZeroOrMore,
cl::init(' '));
static cl::opt<std::string> static cl::opt<std::string>
TargetTriple("mtriple", cl::desc("Override target triple for module")); TargetTriple("mtriple", cl::desc("Override target triple for module"));

View File

@ -98,7 +98,7 @@ static cl::opt<bool> NoExec("noexec", cl::desc("Do not execute loaded code"),
static cl::list<std::string> static cl::list<std::string>
CheckFiles("check", cl::desc("File containing verifier checks"), CheckFiles("check", cl::desc("File containing verifier checks"),
cl::ZeroOrMore, cl::cat(JITLinkCategory)); cl::cat(JITLinkCategory));
static cl::opt<std::string> static cl::opt<std::string>
CheckName("check-name", cl::desc("Name of checks to match against"), CheckName("check-name", cl::desc("Name of checks to match against"),
@ -118,7 +118,7 @@ static cl::list<std::string>
Dylibs("preload", Dylibs("preload",
cl::desc("Pre-load dynamic libraries (e.g. language runtimes " cl::desc("Pre-load dynamic libraries (e.g. language runtimes "
"required by the ORC runtime)"), "required by the ORC runtime)"),
cl::ZeroOrMore, cl::cat(JITLinkCategory)); cl::cat(JITLinkCategory));
static cl::list<std::string> InputArgv("args", cl::Positional, static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."), cl::desc("<program arguments>..."),
@ -138,7 +138,7 @@ static cl::opt<bool>
static cl::list<std::string> AbsoluteDefs( static cl::list<std::string> AbsoluteDefs(
"abs", "abs",
cl::desc("Inject absolute symbol definitions (syntax: <name>=<addr>)"), cl::desc("Inject absolute symbol definitions (syntax: <name>=<addr>)"),
cl::ZeroOrMore, cl::cat(JITLinkCategory)); cl::cat(JITLinkCategory));
static cl::list<std::string> static cl::list<std::string>
Aliases("alias", cl::desc("Inject symbol aliases (syntax: <name>=<addr>)"), Aliases("alias", cl::desc("Inject symbol aliases (syntax: <name>=<addr>)"),
@ -146,7 +146,6 @@ static cl::list<std::string>
static cl::list<std::string> TestHarnesses("harness", cl::Positional, static cl::list<std::string> TestHarnesses("harness", cl::Positional,
cl::desc("Test harness files"), cl::desc("Test harness files"),
cl::ZeroOrMore,
cl::PositionalEatsArgs, cl::PositionalEatsArgs,
cl::cat(JITLinkCategory)); cl::cat(JITLinkCategory));

View File

@ -43,7 +43,6 @@ static cl::opt<std::string> OutputFile("o", cl::desc("Specify output filename"),
static cl::list<std::string> InputFiles(cl::Positional, static cl::list<std::string> InputFiles(cl::Positional,
cl::desc("<input files>"), cl::desc("<input files>"),
cl::ZeroOrMore,
cl::cat(LibtoolCategory)); cl::cat(LibtoolCategory));
static cl::opt<std::string> static cl::opt<std::string>
@ -86,7 +85,7 @@ static cl::list<std::string> LibrarySearchDirs(
cl::desc( cl::desc(
"L<dir> adds <dir> to the list of directories in which to search for" "L<dir> adds <dir> to the list of directories in which to search for"
" libraries"), " libraries"),
cl::ZeroOrMore, cl::Prefix, cl::cat(LibtoolCategory)); cl::Prefix, cl::cat(LibtoolCategory));
static cl::opt<bool> static cl::opt<bool>
VersionOption("V", cl::desc("Print the version number and exit"), VersionOption("V", cl::desc("Print the version number and exit"),

View File

@ -48,7 +48,7 @@ static cl::list<std::string> InputFilenames(cl::Positional, cl::OneOrMore,
cl::cat(LinkCategory)); cl::cat(LinkCategory));
static cl::list<std::string> OverridingInputs( static cl::list<std::string> OverridingInputs(
"override", cl::ZeroOrMore, cl::value_desc("filename"), "override", cl::value_desc("filename"),
cl::desc( cl::desc(
"input bitcode file which can override previously defined symbol(s)"), "input bitcode file which can override previously defined symbol(s)"),
cl::cat(LinkCategory)); cl::cat(LinkCategory));

View File

@ -210,7 +210,7 @@ static cl::opt<std::string> OutputFilename("o", cl::init(""),
static cl::list<std::string> ExportedSymbols( static cl::list<std::string> ExportedSymbols(
"exported-symbol", "exported-symbol",
cl::desc("List of symbols to export from the resulting object file"), cl::desc("List of symbols to export from the resulting object file"),
cl::ZeroOrMore, cl::cat(LTOCategory)); cl::cat(LTOCategory));
static cl::list<std::string> static cl::list<std::string>
DSOSymbols("dso-symbol", DSOSymbols("dso-symbol",

View File

@ -315,9 +315,10 @@ cl::opt<cl::boolOrDefault>
ColorOutput("color-output", ColorOutput("color-output",
cl::desc("Override use of color (default = isatty)"), cl::desc("Override use of color (default = isatty)"),
cl::cat(OtherOptions), cl::sub(PrettySubcommand)); cl::cat(OtherOptions), cl::sub(PrettySubcommand));
cl::list<std::string> ExcludeTypes( cl::list<std::string>
"exclude-types", cl::desc("Exclude types by regular expression"), ExcludeTypes("exclude-types",
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand)); cl::desc("Exclude types by regular expression"),
cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> ExcludeSymbols( cl::list<std::string> ExcludeSymbols(
"exclude-symbols", cl::desc("Exclude symbols by regular expression"), "exclude-symbols", cl::desc("Exclude symbols by regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand)); cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand));
@ -328,7 +329,7 @@ cl::list<std::string> ExcludeCompilands(
cl::list<std::string> IncludeTypes( cl::list<std::string> IncludeTypes(
"include-types", "include-types",
cl::desc("Include only types which match a regular expression"), cl::desc("Include only types which match a regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand)); cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::list<std::string> IncludeSymbols( cl::list<std::string> IncludeSymbols(
"include-symbols", "include-symbols",
cl::desc("Include only symbols which match a regular expression"), cl::desc("Include only symbols which match a regular expression"),
@ -336,7 +337,7 @@ cl::list<std::string> IncludeSymbols(
cl::list<std::string> IncludeCompilands( cl::list<std::string> IncludeCompilands(
"include-compilands", "include-compilands",
cl::desc("Include only compilands those which match a regular expression"), cl::desc("Include only compilands those which match a regular expression"),
cl::ZeroOrMore, cl::cat(FilterCategory), cl::sub(PrettySubcommand)); cl::cat(FilterCategory), cl::sub(PrettySubcommand));
cl::opt<uint32_t> SizeThreshold( cl::opt<uint32_t> SizeThreshold(
"min-type-size", cl::desc("Displays only those types which are greater " "min-type-size", cl::desc("Displays only those types which are greater "
"than or equal to the specified size."), "than or equal to the specified size."),
@ -412,11 +413,9 @@ cl::opt<bool> TypeServerMap("type-server", cl::desc("Dump type server map"),
cl::opt<bool> ECData("ec", cl::desc("Dump edit and continue map"), cl::opt<bool> ECData("ec", cl::desc("Dump edit and continue map"),
cl::sub(BytesSubcommand), cl::cat(DbiBytes)); cl::sub(BytesSubcommand), cl::cat(DbiBytes));
cl::list<uint32_t> cl::list<uint32_t> TypeIndex(
TypeIndex("type", "type", cl::desc("Dump the type record with the given type index"),
cl::desc("Dump the type record with the given type index"), cl::CommaSeparated, cl::sub(BytesSubcommand), cl::cat(TypeCategory));
cl::ZeroOrMore, cl::CommaSeparated, cl::sub(BytesSubcommand),
cl::cat(TypeCategory));
cl::list<uint32_t> cl::list<uint32_t>
IdIndex("id", cl::desc("Dump the id record with the given type index"), IdIndex("id", cl::desc("Dump the id record with the given type index"),
cl::ZeroOrMore, cl::CommaSeparated, cl::sub(BytesSubcommand), cl::ZeroOrMore, cl::CommaSeparated, cl::sub(BytesSubcommand),

View File

@ -13,14 +13,12 @@
#define DEBUG_TYPE "perf-reader" #define DEBUG_TYPE "perf-reader"
cl::opt<bool> SkipSymbolization("skip-symbolization", cl::init(false), cl::opt<bool> SkipSymbolization("skip-symbolization",
cl::ZeroOrMore,
cl::desc("Dump the unsymbolized profile to the " cl::desc("Dump the unsymbolized profile to the "
"output file. It will show unwinder " "output file. It will show unwinder "
"output for CS profile generation.")); "output for CS profile generation."));
static cl::opt<bool> ShowMmapEvents("show-mmap-events", cl::init(false), static cl::opt<bool> ShowMmapEvents("show-mmap-events",
cl::ZeroOrMore,
cl::desc("Print binary load events.")); cl::desc("Print binary load events."));
static cl::opt<bool> static cl::opt<bool>
@ -39,8 +37,7 @@ static cl::opt<bool>
IgnoreStackSamples("ignore-stack-samples", IgnoreStackSamples("ignore-stack-samples",
cl::desc("Ignore call stack samples for hybrid samples " cl::desc("Ignore call stack samples for hybrid samples "
"and produce context-insensitive profile.")); "and produce context-insensitive profile."));
cl::opt<bool> ShowDetailedWarning("show-detailed-warning", cl::init(false), cl::opt<bool> ShowDetailedWarning("show-detailed-warning",
cl::ZeroOrMore,
cl::desc("Show detailed warning message.")); cl::desc("Show detailed warning message."));
extern cl::opt<std::string> PerfTraceFilename; extern cl::opt<std::string> PerfTraceFilename;

View File

@ -23,12 +23,10 @@
using namespace llvm; using namespace llvm;
using namespace sampleprof; using namespace sampleprof;
cl::opt<bool> ShowDisassemblyOnly("show-disassembly-only", cl::init(false), cl::opt<bool> ShowDisassemblyOnly("show-disassembly-only",
cl::ZeroOrMore,
cl::desc("Print disassembled code.")); cl::desc("Print disassembled code."));
cl::opt<bool> ShowSourceLocations("show-source-locations", cl::init(false), cl::opt<bool> ShowSourceLocations("show-source-locations",
cl::ZeroOrMore,
cl::desc("Print source locations.")); cl::desc("Print source locations."));
static cl::opt<bool> static cl::opt<bool>

View File

@ -41,7 +41,7 @@ static cl::alias PDA("pd", cl::desc("Alias for --perfdata"),
static cl::opt<std::string> UnsymbolizedProfFilename( static cl::opt<std::string> UnsymbolizedProfFilename(
"unsymbolized-profile", cl::value_desc("unsymbolized profile"), "unsymbolized-profile", cl::value_desc("unsymbolized profile"),
cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated, llvm::cl::MiscFlags::CommaSeparated,
cl::desc("Path of the unsymbolized profile created by " cl::desc("Path of the unsymbolized profile created by "
"`llvm-profgen` with `--skip-symbolization`"), "`llvm-profgen` with `--skip-symbolization`"),
cl::cat(ProfGenCategory)); cl::cat(ProfGenCategory));

View File

@ -79,7 +79,7 @@ static cl::opt<std::string>
cl::init("_main"), cl::cat(RTDyldCategory)); cl::init("_main"), cl::cat(RTDyldCategory));
static cl::list<std::string> Dylibs("dylib", cl::desc("Add library."), static cl::list<std::string> Dylibs("dylib", cl::desc("Add library."),
cl::ZeroOrMore, cl::cat(RTDyldCategory)); cl::cat(RTDyldCategory));
static cl::list<std::string> InputArgv("args", cl::Positional, static cl::list<std::string> InputArgv("args", cl::Positional,
cl::desc("<program arguments>..."), cl::desc("<program arguments>..."),
@ -98,7 +98,7 @@ static cl::opt<std::string>
static cl::list<std::string> static cl::list<std::string>
CheckFiles("check", CheckFiles("check",
cl::desc("File containing RuntimeDyld verifier checks."), cl::desc("File containing RuntimeDyld verifier checks."),
cl::ZeroOrMore, cl::cat(RTDyldCategory)); cl::cat(RTDyldCategory));
static cl::opt<uint64_t> static cl::opt<uint64_t>
PreallocMemory("preallocate", PreallocMemory("preallocate",
@ -127,14 +127,13 @@ static cl::list<std::string>
SpecificSectionMappings("map-section", SpecificSectionMappings("map-section",
cl::desc("For -verify only: Map a section to a " cl::desc("For -verify only: Map a section to a "
"specific address."), "specific address."),
cl::ZeroOrMore, cl::Hidden, cl::Hidden, cl::cat(RTDyldCategory));
cl::cat(RTDyldCategory));
static cl::list<std::string> DummySymbolMappings( static cl::list<std::string> DummySymbolMappings(
"dummy-extern", "dummy-extern",
cl::desc("For -verify only: Inject a symbol into the extern " cl::desc("For -verify only: Inject a symbol into the extern "
"symbol table."), "symbol table."),
cl::ZeroOrMore, cl::Hidden, cl::cat(RTDyldCategory)); cl::Hidden, cl::cat(RTDyldCategory));
static cl::opt<bool> PrintAllocationRequests( static cl::opt<bool> PrintAllocationRequests(
"print-alloc-requests", "print-alloc-requests",

View File

@ -56,7 +56,7 @@ cl::opt<bool> WarnTrailing("warn-trailing", cl::Optional,
cl::desc("warn on trailing characters"), cl::Hidden, cl::desc("warn on trailing characters"), cl::Hidden,
cl::init(false), cl::cat(UndNameCategory)); cl::init(false), cl::cat(UndNameCategory));
cl::list<std::string> Symbols(cl::Positional, cl::desc("<input symbols>"), cl::list<std::string> Symbols(cl::Positional, cl::desc("<input symbols>"),
cl::ZeroOrMore, cl::cat(UndNameCategory)); cl::cat(UndNameCategory));
static bool msDemangle(const std::string &S) { static bool msDemangle(const std::string &S) {
int Status; int Status;

View File

@ -34,12 +34,10 @@ static codegen::RegisterCodeGenFlags CGF;
// extra command-line flags needed for LTOCodeGenerator // extra command-line flags needed for LTOCodeGenerator
static cl::opt<char> static cl::opt<char>
OptLevel("O", OptLevel("O",
cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] "
"(default = '-O2')"), "(default = '-O2')"),
cl::Prefix, cl::Prefix, cl::init('2'));
cl::ZeroOrMore,
cl::init('2'));
static cl::opt<bool> EnableFreestanding( static cl::opt<bool> EnableFreestanding(
"lto-freestanding", cl::init(false), "lto-freestanding", cl::init(false),

View File

@ -1154,7 +1154,7 @@ TEST(CommandLineTest, PositionalEatArgsError) {
StackOption<std::string, cl::list<std::string>> PosEatArgs( StackOption<std::string, cl::list<std::string>> PosEatArgs(
"positional-eat-args", cl::Positional, cl::desc("<arguments>..."), "positional-eat-args", cl::Positional, cl::desc("<arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::PositionalEatsArgs);
StackOption<std::string, cl::list<std::string>> PosEatArgs2( StackOption<std::string, cl::list<std::string>> PosEatArgs2(
"positional-eat-args2", cl::Positional, cl::desc("Some strings"), "positional-eat-args2", cl::Positional, cl::desc("Some strings"),
cl::ZeroOrMore, cl::PositionalEatsArgs); cl::ZeroOrMore, cl::PositionalEatsArgs);

View File

@ -75,8 +75,7 @@ struct Options {
llvm::cl::OptionCategory clOptionsCategory{"linking options"}; llvm::cl::OptionCategory clOptionsCategory{"linking options"};
llvm::cl::list<std::string> clSharedLibs{ llvm::cl::list<std::string> clSharedLibs{
"shared-libs", llvm::cl::desc("Libraries to link dynamically"), "shared-libs", llvm::cl::desc("Libraries to link dynamically"),
llvm::cl::ZeroOrMore, llvm::cl::MiscFlags::CommaSeparated, llvm::cl::MiscFlags::CommaSeparated, llvm::cl::cat(clOptionsCategory)};
llvm::cl::cat(clOptionsCategory)};
/// CLI variables for debugging. /// CLI variables for debugging.
llvm::cl::opt<bool> dumpObjectFile{ llvm::cl::opt<bool> dumpObjectFile{

View File

@ -38,7 +38,7 @@ static llvm::cl::OptionCategory clOptionsCategory(DEBUG_TYPE " options");
static llvm::cl::list<int> clTestVectorShapeRatio( static llvm::cl::list<int> clTestVectorShapeRatio(
"vector-shape-ratio", "vector-shape-ratio",
llvm::cl::desc("Specify the HW vector size for vectorization"), llvm::cl::desc("Specify the HW vector size for vectorization"),
llvm::cl::ZeroOrMore, llvm::cl::cat(clOptionsCategory)); llvm::cl::cat(clOptionsCategory));
static llvm::cl::opt<bool> clTestForwardSlicingAnalysis( static llvm::cl::opt<bool> clTestForwardSlicingAnalysis(
"forward-slicing", "forward-slicing",
llvm::cl::desc("Enable testing forward static slicing and topological sort " llvm::cl::desc("Enable testing forward static slicing and topological sort "

View File

@ -40,8 +40,7 @@ static cl::opt<bool> CheckParallel("polly-check-parallel",
static cl::opt<bool> CheckVectorizable("polly-check-vectorizable", static cl::opt<bool> CheckVectorizable("polly-check-vectorizable",
cl::desc("Check for vectorizable loops"), cl::desc("Check for vectorizable loops"),
cl::Hidden, cl::init(false), cl::Hidden, cl::cat(PollyCategory));
cl::ZeroOrMore, cl::cat(PollyCategory));
void PolyhedralInfo::getAnalysisUsage(AnalysisUsage &AU) const { void PolyhedralInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredTransitive<DependenceInfoWrapperPass>(); AU.addRequiredTransitive<DependenceInfoWrapperPass>();

View File

@ -116,7 +116,7 @@ static cl::opt<unsigned> RunTimeChecksMaxAccessDisjuncts(
static cl::opt<unsigned> RunTimeChecksMaxParameters( static cl::opt<unsigned> RunTimeChecksMaxParameters(
"polly-rtc-max-parameters", "polly-rtc-max-parameters",
cl::desc("The maximal number of parameters allowed in RTCs."), cl::Hidden, cl::desc("The maximal number of parameters allowed in RTCs."), cl::Hidden,
cl::ZeroOrMore, cl::init(8), cl::cat(PollyCategory)); cl::init(8), cl::cat(PollyCategory));
static cl::opt<bool> UnprofitableScalarAccs( static cl::opt<bool> UnprofitableScalarAccs(
"polly-unprofitable-scalar-accs", "polly-unprofitable-scalar-accs",

View File

@ -165,7 +165,7 @@ static cl::opt<bool> PollyPrintInstructions(
static cl::list<std::string> IslArgs("polly-isl-arg", static cl::list<std::string> IslArgs("polly-isl-arg",
cl::value_desc("argument"), cl::value_desc("argument"),
cl::desc("Option passed to ISL"), cl::desc("Option passed to ISL"),
cl::ZeroOrMore, cl::cat(PollyCategory)); cl::cat(PollyCategory));
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//

View File

@ -94,13 +94,12 @@ static cl::opt<bool>
cl::desc("Fail and generate a backtrace if" cl::desc("Fail and generate a backtrace if"
" verifyModule fails on the GPU " " verifyModule fails on the GPU "
" kernel module."), " kernel module."),
cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(PollyCategory));
cl::cat(PollyCategory));
static cl::opt<std::string> CUDALibDevice( static cl::opt<std::string> CUDALibDevice(
"polly-acc-libdevice", cl::desc("Path to CUDA libdevice"), cl::Hidden, "polly-acc-libdevice", cl::desc("Path to CUDA libdevice"), cl::Hidden,
cl::init("/usr/local/cuda/nvvm/libdevice/libdevice.compute_20.10.ll"), cl::init("/usr/local/cuda/nvvm/libdevice/libdevice.compute_20.10.ll"),
cl::ZeroOrMore, cl::cat(PollyCategory)); cl::cat(PollyCategory));
static cl::opt<std::string> static cl::opt<std::string>
CudaVersion("polly-acc-cuda-version", CudaVersion("polly-acc-cuda-version",

View File

@ -96,8 +96,7 @@ static cl::opt<OptimizerChoice>
cl::values(clEnumValN(OPTIMIZER_NONE, "none", "No optimizer"), cl::values(clEnumValN(OPTIMIZER_NONE, "none", "No optimizer"),
clEnumValN(OPTIMIZER_ISL, "isl", clEnumValN(OPTIMIZER_ISL, "isl",
"The isl scheduling optimizer")), "The isl scheduling optimizer")),
cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore, cl::Hidden, cl::init(OPTIMIZER_ISL), cl::cat(PollyCategory));
cl::cat(PollyCategory));
enum CodeGenChoice { CODEGEN_FULL, CODEGEN_AST, CODEGEN_NONE }; enum CodeGenChoice { CODEGEN_FULL, CODEGEN_AST, CODEGEN_NONE };
static cl::opt<CodeGenChoice> CodeGeneration( static cl::opt<CodeGenChoice> CodeGeneration(
@ -210,7 +209,7 @@ static cl::opt<bool>
static cl::list<std::string> DumpAfterFile( static cl::list<std::string> DumpAfterFile(
"polly-dump-after-file", "polly-dump-after-file",
cl::desc("Dump module after Polly transformations to the given file"), cl::desc("Dump module after Polly transformations to the given file"),
cl::ZeroOrMore, cl::cat(PollyCategory)); cl::cat(PollyCategory));
static cl::opt<bool> static cl::opt<bool>
EnableDeLICM("polly-enable-delicm", EnableDeLICM("polly-enable-delicm",

View File

@ -32,7 +32,7 @@ static cl::list<std::string> DebugFunctions(
cl::desc("Allow calls to the specified functions in SCoPs even if their " cl::desc("Allow calls to the specified functions in SCoPs even if their "
"side-effects are unknown. This can be used to do debug output in " "side-effects are unknown. This can be used to do debug output in "
"Polly-transformed code."), "Polly-transformed code."),
cl::Hidden, cl::ZeroOrMore, cl::CommaSeparated, cl::cat(PollyCategory)); cl::Hidden, cl::CommaSeparated, cl::cat(PollyCategory));
// Ensures that there is just one predecessor to the entry node from outside the // Ensures that there is just one predecessor to the entry node from outside the
// region. // region.

View File

@ -99,7 +99,7 @@ static cl::opt<std::string>
static cl::opt<bool> static cl::opt<bool>
GreedyFusion("polly-loopfusion-greedy", GreedyFusion("polly-loopfusion-greedy",
cl::desc("Aggressively try to fuse everything"), cl::Hidden, cl::desc("Aggressively try to fuse everything"), cl::Hidden,
cl::ZeroOrMore, cl::cat(PollyCategory)); cl::cat(PollyCategory));
static cl::opt<std::string> OuterCoincidence( static cl::opt<std::string> OuterCoincidence(
"polly-opt-outer-coincidence", "polly-opt-outer-coincidence",