[llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC

Some cl::ZeroOrMore were added to avoid the `may only occur zero or one times!`
error. More were added due to cargo cult. Since the error has been removed,
cl::ZeroOrMore is unneeded.

Also remove cl::init(false) while touching the lines.
This commit is contained in:
Fangrui Song 2022-06-03 21:59:05 -07:00
parent f14d18c7a9
commit 557efc9a8b
62 changed files with 270 additions and 268 deletions

View File

@ -31,9 +31,9 @@ namespace llvm {
#ifndef DONT_GET_PLUGIN_LOADER_OPTION
// This causes operator= above to be invoked for every -load option.
static cl::opt<PluginLoader, false, cl::parser<std::string> >
LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"),
cl::desc("Load the specified plugin"));
static cl::opt<PluginLoader, false, cl::parser<std::string>>
LoadOpt("load", cl::value_desc("pluginfilename"),
cl::desc("Load the specified plugin"));
#endif
}

View File

@ -47,7 +47,7 @@ cl::opt<bool> CheckBFIUnknownBlockQueries(
"for debugging missed BFI updates"));
cl::opt<bool> UseIterativeBFIInference(
"use-iterative-bfi-inference", cl::init(false), cl::Hidden, cl::ZeroOrMore,
"use-iterative-bfi-inference", cl::Hidden,
cl::desc("Apply an iterative post-processing to infer correct BFI counts"));
cl::opt<unsigned> IterativeBFIMaxIterationsPerBlock(

View File

@ -17,13 +17,12 @@
using namespace llvm;
static cl::opt<bool> SimplifyDDG(
"ddg-simplify", cl::init(true), cl::Hidden, cl::ZeroOrMore,
"ddg-simplify", cl::init(true), cl::Hidden,
cl::desc(
"Simplify DDG by merging nodes that have less interesting edges."));
static cl::opt<bool>
CreatePiBlocks("ddg-pi-blocks", cl::init(true), cl::Hidden, cl::ZeroOrMore,
cl::desc("Create pi-block nodes."));
static cl::opt<bool> CreatePiBlocks("ddg-pi-blocks", cl::init(true), cl::Hidden,
cl::desc("Create pi-block nodes."));
#define DEBUG_TYPE "ddg"

View File

@ -106,7 +106,7 @@ STATISTIC(BanerjeeIndependence, "Banerjee independence");
STATISTIC(BanerjeeSuccesses, "Banerjee successes");
static cl::opt<bool>
Delinearize("da-delinearize", cl::init(true), cl::Hidden, cl::ZeroOrMore,
Delinearize("da-delinearize", cl::init(true), cl::Hidden,
cl::desc("Try to delinearize array references."));
static cl::opt<bool> DisableDelinearizationChecks(
"da-disable-delinearization-checks", cl::init(false), cl::Hidden,
@ -118,7 +118,7 @@ static cl::opt<bool> DisableDelinearizationChecks(
"dimension to underflow or overflow into another dimension."));
static cl::opt<unsigned> MIVMaxLevelThreshold(
"da-miv-max-level-threshold", cl::init(7), cl::Hidden, cl::ZeroOrMore,
"da-miv-max-level-threshold", cl::init(7), cl::Hidden,
cl::desc("Maximum depth allowed for the recursive algorithm used to "
"explore MIV direction vectors."));

View File

@ -26,7 +26,7 @@ using namespace llvm;
// The percent threshold for the direct-call target (this call site vs the
// remaining call count) for it to be considered as the promotion target.
static cl::opt<unsigned> ICPRemainingPercentThreshold(
"icp-remaining-percent-threshold", cl::init(30), cl::Hidden, cl::ZeroOrMore,
"icp-remaining-percent-threshold", cl::init(30), cl::Hidden,
cl::desc("The percentage threshold against remaining unpromoted indirect "
"call count for the promotion"));
@ -41,7 +41,7 @@ static cl::opt<unsigned>
// Set the maximum number of targets to promote for a single indirect-call
// callsite.
static cl::opt<unsigned>
MaxNumPromotions("icp-max-prom", cl::init(3), cl::Hidden, cl::ZeroOrMore,
MaxNumPromotions("icp-max-prom", cl::init(3), cl::Hidden,
cl::desc("Max number of promotions for a single indirect "
"call callsite"));

View File

@ -69,11 +69,11 @@ static cl::opt<bool> PrintInstructionComments(
cl::desc("Prints comments for instruction based on inline cost analysis"));
static cl::opt<int> InlineThreshold(
"inline-threshold", cl::Hidden, cl::init(225), cl::ZeroOrMore,
"inline-threshold", cl::Hidden, cl::init(225),
cl::desc("Control the amount of inlining to perform (default = 225)"));
static cl::opt<int> HintThreshold(
"inlinehint-threshold", cl::Hidden, cl::init(325), cl::ZeroOrMore,
"inlinehint-threshold", cl::Hidden, cl::init(325),
cl::desc("Threshold for inlining functions with inline hint"));
static cl::opt<int>
@ -86,7 +86,7 @@ static cl::opt<bool> InlineEnableCostBenefitAnalysis(
cl::desc("Enable the cost-benefit analysis for the inliner"));
static cl::opt<int> InlineSavingsMultiplier(
"inline-savings-multiplier", cl::Hidden, cl::init(8), cl::ZeroOrMore,
"inline-savings-multiplier", cl::Hidden, cl::init(8),
cl::desc("Multiplier to multiply cycle savings by during inlining"));
static cl::opt<int>
@ -99,7 +99,7 @@ static cl::opt<int>
// PGO before we actually hook up inliner with analysis passes such as BPI and
// BFI.
static cl::opt<int> ColdThreshold(
"inlinecold-threshold", cl::Hidden, cl::init(45), cl::ZeroOrMore,
"inlinecold-threshold", cl::Hidden, cl::init(45),
cl::desc("Threshold for inlining functions with cold attribute"));
static cl::opt<int>
@ -108,17 +108,17 @@ static cl::opt<int>
cl::desc("Threshold for hot callsites "));
static cl::opt<int> LocallyHotCallSiteThreshold(
"locally-hot-callsite-threshold", cl::Hidden, cl::init(525), cl::ZeroOrMore,
"locally-hot-callsite-threshold", cl::Hidden, cl::init(525),
cl::desc("Threshold for locally hot callsites "));
static cl::opt<int> ColdCallSiteRelFreq(
"cold-callsite-rel-freq", cl::Hidden, cl::init(2), cl::ZeroOrMore,
"cold-callsite-rel-freq", cl::Hidden, cl::init(2),
cl::desc("Maximum block frequency, expressed as a percentage of caller's "
"entry frequency, for a callsite to be cold in the absence of "
"profile information."));
static cl::opt<int> HotCallSiteRelFreq(
"hot-callsite-rel-freq", cl::Hidden, cl::init(60), cl::ZeroOrMore,
"hot-callsite-rel-freq", cl::Hidden, cl::init(60),
cl::desc("Minimum block frequency, expressed as a multiple of caller's "
"entry frequency, for a callsite to be hot in the absence of "
"profile information."));
@ -128,7 +128,7 @@ static cl::opt<int> CallPenalty(
cl::desc("Call penalty that is applied per callsite when inlining"));
static cl::opt<bool> OptComputeFullInlineCost(
"inline-cost-full", cl::Hidden, cl::init(false), cl::ZeroOrMore,
"inline-cost-full", cl::Hidden,
cl::desc("Compute the full inline cost of a call site even when the cost "
"exceeds the threshold."));

View File

@ -173,7 +173,7 @@ static cl::opt<bool> DisablePreheaderProtect(
cl::desc("Disable protection against removing loop preheaders"));
static cl::opt<bool> ProfileGuidedSectionPrefix(
"profile-guided-section-prefix", cl::Hidden, cl::init(true), cl::ZeroOrMore,
"profile-guided-section-prefix", cl::Hidden, cl::init(true),
cl::desc("Use profile info to add section prefix for hot/cold functions"));
static cl::opt<bool> ProfileUnknownInSpecialSection(

View File

@ -33,9 +33,9 @@
#include "llvm/Target/TargetOptions.h"
using namespace llvm;
static cl::opt<bool> EnableTrapUnreachable("trap-unreachable",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enable generating trap for unreachable"));
static cl::opt<bool>
EnableTrapUnreachable("trap-unreachable", cl::Hidden,
cl::desc("Enable generating trap for unreachable"));
void LLVMTargetMachine::initAsmInfo() {
MRI.reset(TheTarget.createMCRegInfo(getTargetTriple().str()));

View File

@ -26,7 +26,7 @@
using namespace llvm;
static cl::opt<RegAllocEvictionAdvisorAnalysis::AdvisorMode> Mode(
"regalloc-enable-advisor", cl::Hidden, cl::ZeroOrMore,
"regalloc-enable-advisor", cl::Hidden,
cl::init(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default),
cl::desc("Enable regalloc advisor mode"),
cl::values(

View File

@ -37,8 +37,8 @@ static cl::opt<bool> DisableDFASched("disable-dfa-sched", cl::Hidden,
cl::desc("Disable use of DFA during scheduling"));
static cl::opt<int> RegPressureThreshold(
"dfa-sched-reg-pressure-threshold", cl::Hidden, cl::ZeroOrMore, cl::init(5),
cl::desc("Track reg pressure and switch priority to in-depth"));
"dfa-sched-reg-pressure-threshold", cl::Hidden, cl::init(5),
cl::desc("Track reg pressure and switch priority to in-depth"));
ResourcePriorityQueue::ResourcePriorityQueue(SelectionDAGISel *IS)
: Picker(this), InstrItins(IS->MF->getSubtarget().getInstrItineraryData()) {

View File

@ -48,8 +48,7 @@ static cl::opt<bool> UseNewerCandidate("use-newer-candidate", cl::Hidden,
cl::ZeroOrMore, cl::init(true));
static cl::opt<unsigned> SchedDebugVerboseLevel("misched-verbose-level",
cl::Hidden, cl::ZeroOrMore,
cl::init(1));
cl::Hidden, cl::init(1));
// Check if the scheduler should penalize instructions that are available to
// early due to a zero-latency dependence.

View File

@ -27,7 +27,7 @@ using namespace llvm;
namespace llvm {
// Use FS-AFDO discriminator.
cl::opt<bool> EnableFSDiscriminator(
"enable-fs-discriminator", cl::Hidden, cl::init(false), cl::ZeroOrMore,
"enable-fs-discriminator", cl::Hidden,
cl::desc("Enable adding flow sensitive discriminators"));
} // namespace llvm

View File

@ -141,7 +141,7 @@ static cl::opt<InliningAdvisorMode> UseInlineAdvisor(
"Use release mode (AOT-compiled model).")));
static cl::opt<bool> EnableSyntheticCounts(
"enable-npm-synthetic-counts", cl::init(false), cl::Hidden, cl::ZeroOrMore,
"enable-npm-synthetic-counts", cl::Hidden,
cl::desc("Run synthetic function entry count generation "
"pass"));
@ -151,8 +151,7 @@ static cl::opt<bool>
cl::Hidden,
cl::desc("Enable inline deferral during PGO"));
static cl::opt<bool> EnableMemProfiler("enable-mem-prof", cl::init(false),
cl::Hidden, cl::ZeroOrMore,
static cl::opt<bool> EnableMemProfiler("enable-mem-prof", cl::Hidden,
cl::desc("Enable memory profiler"));
static cl::opt<bool> EnableModuleInliner("enable-module-inliner",
@ -160,7 +159,7 @@ static cl::opt<bool> EnableModuleInliner("enable-module-inliner",
cl::desc("Enable module inliner"));
static cl::opt<bool> PerformMandatoryInliningsFirst(
"mandatory-inlining-first", cl::init(true), cl::Hidden, cl::ZeroOrMore,
"mandatory-inlining-first", cl::init(true), cl::Hidden,
cl::desc("Perform mandatory inlinings module-wide, before performing "
"inlining."));

View File

@ -19,7 +19,7 @@
using namespace llvm;
cl::opt<bool> UseContextLessSummary(
"profile-summary-contextless", cl::Hidden, cl::init(false), cl::ZeroOrMore,
"profile-summary-contextless", cl::Hidden,
cl::desc("Merge context profiles before calculating thresholds."));
// The following two parameters determine the threshold for a count to be
@ -30,12 +30,12 @@ cl::opt<bool> UseContextLessSummary(
// threshold for determining cold count (everything <= this threshold is
// considered cold).
cl::opt<int> ProfileSummaryCutoffHot(
"profile-summary-cutoff-hot", cl::Hidden, cl::init(990000), cl::ZeroOrMore,
"profile-summary-cutoff-hot", cl::Hidden, cl::init(990000),
cl::desc("A count is hot if it exceeds the minimum count to"
" reach this percentile of total counts."));
cl::opt<int> ProfileSummaryCutoffCold(
"profile-summary-cutoff-cold", cl::Hidden, cl::init(999999), cl::ZeroOrMore,
"profile-summary-cutoff-cold", cl::Hidden, cl::init(999999),
cl::desc("A count is cold if it is below the minimum count"
" to reach this percentile of total counts."));
@ -56,12 +56,12 @@ cl::opt<unsigned> ProfileSummaryLargeWorkingSetSizeThreshold(
// The next two options override the counts derived from summary computation and
// are useful for debugging purposes.
cl::opt<uint64_t> ProfileSummaryHotCount(
"profile-summary-hot-count", cl::ReallyHidden, cl::ZeroOrMore,
"profile-summary-hot-count", cl::ReallyHidden,
cl::desc("A fixed hot count that overrides the count derived from"
" profile-summary-cutoff-hot"));
cl::opt<uint64_t> ProfileSummaryColdCount(
"profile-summary-cold-count", cl::ReallyHidden, cl::ZeroOrMore,
"profile-summary-cold-count", cl::ReallyHidden,
cl::desc("A fixed cold count that overrides the count derived from"
" profile-summary-cutoff-cold"));

View File

@ -29,12 +29,12 @@ using namespace llvm;
using namespace sampleprof;
static cl::opt<uint64_t> ProfileSymbolListCutOff(
"profile-symbol-list-cutoff", cl::Hidden, cl::init(-1), cl::ZeroOrMore,
"profile-symbol-list-cutoff", cl::Hidden, cl::init(-1),
cl::desc("Cutoff value about how many symbols in profile symbol list "
"will be used. This is very useful for performance debugging"));
cl::opt<bool> GenerateMergedBaseProfiles(
"generate-merged-base-profiles", cl::init(false), cl::ZeroOrMore,
"generate-merged-base-profiles",
cl::desc("When generating nested context-sensitive profiles, always "
"generate extra base profile for function with all its context "
"profiles merged into it."));

View File

@ -252,7 +252,7 @@ static cl::opt<bool> OrderFrameObjects("aarch64-order-frame-objects",
cl::init(true), cl::Hidden);
cl::opt<bool> EnableHomogeneousPrologEpilog(
"homogeneous-prolog-epilog", cl::init(false), cl::ZeroOrMore, cl::Hidden,
"homogeneous-prolog-epilog", cl::Hidden,
cl::desc("Emit homogeneous prologue and epilogue for the size "
"optimization (default = off)"));

View File

@ -65,7 +65,7 @@ using namespace llvm;
#define DEBUG_TYPE "aarch64-stack-tagging"
static cl::opt<bool> ClMergeInit(
"stack-tagging-merge-init", cl::Hidden, cl::init(true), cl::ZeroOrMore,
"stack-tagging-merge-init", cl::Hidden, cl::init(true),
cl::desc("merge stack variable initializers with tagging when possible"));
static cl::opt<bool>

View File

@ -36,7 +36,7 @@ using namespace llvm;
namespace llvm {
static cl::opt<unsigned> ArcKillAddrMode("arc-kill-addr-mode", cl::init(0),
cl::ReallyHidden, cl::ZeroOrMore);
cl::ReallyHidden);
#define DUMP_BEFORE() ((ArcKillAddrMode & 0x0001) != 0)
#define DUMP_AFTER() ((ArcKillAddrMode & 0x0002) != 0)

View File

@ -33,8 +33,9 @@ using namespace llvm;
// Since we have no exact knowledge of code layout, allow some safety buffer
// for jump target. This is measured in bytes.
static cl::opt<uint32_t> BranchRelaxSafetyBuffer("branch-relax-safety-buffer",
cl::init(200), cl::Hidden, cl::ZeroOrMore, cl::desc("safety buffer size"));
static cl::opt<uint32_t>
BranchRelaxSafetyBuffer("branch-relax-safety-buffer", cl::init(200),
cl::Hidden, cl::desc("safety buffer size"));
namespace llvm {

View File

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

View File

@ -29,12 +29,13 @@
using namespace llvm;
static cl::opt<unsigned> CountThreshold("hexagon-cext-threshold",
cl::init(3), cl::Hidden, cl::ZeroOrMore,
cl::desc("Minimum number of extenders to trigger replacement"));
static cl::opt<unsigned> CountThreshold(
"hexagon-cext-threshold", cl::init(3), cl::Hidden,
cl::desc("Minimum number of extenders to trigger replacement"));
static cl::opt<unsigned> ReplaceLimit("hexagon-cext-limit", cl::init(0),
cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum number of replacements"));
static cl::opt<unsigned>
ReplaceLimit("hexagon-cext-limit", cl::init(0), cl::Hidden,
cl::desc("Maximum number of replacements"));
namespace llvm {
void initializeHexagonConstExtendersPass(PassRegistry&);

View File

@ -33,16 +33,14 @@ using namespace llvm;
#define DEBUG_TYPE "hexagon-copy-combine"
static
cl::opt<bool> IsCombinesDisabled("disable-merge-into-combines",
cl::Hidden, cl::ZeroOrMore,
cl::init(false),
cl::desc("Disable merging into combines"));
static
cl::opt<bool> IsConst64Disabled("disable-const64",
cl::Hidden, cl::ZeroOrMore,
cl::init(false),
cl::desc("Disable generation of const64"));
static cl::opt<bool>
IsCombinesDisabled("disable-merge-into-combines", cl::Hidden,
cl::desc("Disable merging into combines"));
static cl::opt<bool>
IsConst64Disabled("disable-const64", cl::Hidden,
cl::desc("Disable generation of const64"));
static
cl::opt<unsigned>
MaxNumOfInstsBetweenNewValueStoreAndTFR("max-num-inst-between-tfr-and-nv-store",

View File

@ -168,13 +168,14 @@ static cl::opt<bool> EnableStackOVFSanitizer("enable-stackovf-sanitizer",
cl::Hidden, cl::desc("Enable runtime checks for stack overflow."),
cl::init(false), cl::ZeroOrMore);
static cl::opt<bool> EnableShrinkWrapping("hexagon-shrink-frame",
cl::init(true), cl::Hidden, cl::ZeroOrMore,
cl::desc("Enable stack frame shrink wrapping"));
static cl::opt<bool>
EnableShrinkWrapping("hexagon-shrink-frame", cl::init(true), cl::Hidden,
cl::desc("Enable stack frame shrink wrapping"));
static cl::opt<unsigned> ShrinkLimit("shrink-frame-limit",
cl::init(std::numeric_limits<unsigned>::max()), cl::Hidden, cl::ZeroOrMore,
cl::desc("Max count of stack frame shrink-wraps"));
static cl::opt<unsigned>
ShrinkLimit("shrink-frame-limit",
cl::init(std::numeric_limits<unsigned>::max()), cl::Hidden,
cl::desc("Max count of stack frame shrink-wraps"));
static cl::opt<bool> EnableSaveRestoreLong("enable-save-restore-long",
cl::Hidden, cl::desc("Enable long calls for save-restore stubs."),

View File

@ -47,25 +47,29 @@
using namespace llvm;
static cl::opt<unsigned> VRegIndexCutoff("insert-vreg-cutoff", cl::init(~0U),
cl::Hidden, cl::ZeroOrMore, cl::desc("Vreg# cutoff for insert generation."));
static cl::opt<unsigned>
VRegIndexCutoff("insert-vreg-cutoff", cl::init(~0U), cl::Hidden,
cl::desc("Vreg# cutoff for insert generation."));
// The distance cutoff is selected based on the precheckin-perf results:
// cutoffs 20, 25, 35, and 40 are worse than 30.
static cl::opt<unsigned> VRegDistCutoff("insert-dist-cutoff", cl::init(30U),
cl::Hidden, cl::ZeroOrMore, cl::desc("Vreg distance cutoff for insert "
"generation."));
static cl::opt<unsigned>
VRegDistCutoff("insert-dist-cutoff", cl::init(30U), cl::Hidden,
cl::desc("Vreg distance cutoff for insert "
"generation."));
// Limit the container sizes for extreme cases where we run out of memory.
static cl::opt<unsigned> MaxORLSize("insert-max-orl", cl::init(4096),
cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum size of OrderedRegisterList"));
static cl::opt<unsigned>
MaxORLSize("insert-max-orl", cl::init(4096), cl::Hidden,
cl::desc("Maximum size of OrderedRegisterList"));
static cl::opt<unsigned> MaxIFMSize("insert-max-ifmap", cl::init(1024),
cl::Hidden, cl::ZeroOrMore, cl::desc("Maximum size of IFMap"));
static cl::opt<bool> OptTiming("insert-timing", cl::init(false), cl::Hidden,
cl::ZeroOrMore, cl::desc("Enable timing of insert generation"));
static cl::opt<bool> OptTimingDetail("insert-timing-detail", cl::init(false),
cl::Hidden, cl::ZeroOrMore, cl::desc("Enable detailed timing of insert "
"generation"));
static cl::opt<bool>
OptTimingDetail("insert-timing-detail", cl::Hidden,
cl::desc("Enable detailed timing of insert "
"generation"));
static cl::opt<bool> OptSelectAll0("insert-all0", cl::init(false), cl::Hidden,
cl::ZeroOrMore);

View File

@ -81,9 +81,9 @@ static cl::opt<bool> HWCreatePreheader("hexagon-hwloop-preheader",
// Turn it off by default. If a preheader block is not created here, the
// software pipeliner may be unable to find a block suitable to serve as
// a preheader. In that case SWP will not run.
static cl::opt<bool> SpecPreheader("hwloop-spec-preheader", cl::init(false),
cl::Hidden, cl::ZeroOrMore, cl::desc("Allow speculation of preheader "
"instructions"));
static cl::opt<bool> SpecPreheader("hwloop-spec-preheader", cl::Hidden,
cl::desc("Allow speculation of preheader "
"instructions"));
STATISTIC(NumHWLoops, "Number of loops converted to hardware loops");

View File

@ -72,41 +72,41 @@ static cl::opt<bool> EmitJumpTables("hexagon-emit-jump-tables",
cl::init(true), cl::Hidden,
cl::desc("Control jump table emission on Hexagon target"));
static cl::opt<bool> EnableHexSDNodeSched("enable-hexagon-sdnode-sched",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enable Hexagon SDNode scheduling"));
static cl::opt<bool>
EnableHexSDNodeSched("enable-hexagon-sdnode-sched", cl::Hidden,
cl::desc("Enable Hexagon SDNode scheduling"));
static cl::opt<bool> EnableFastMath("ffast-math",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enable Fast Math processing"));
static cl::opt<bool> EnableFastMath("ffast-math", cl::Hidden,
cl::desc("Enable Fast Math processing"));
static cl::opt<int> MinimumJumpTables("minimum-jump-tables",
cl::Hidden, cl::ZeroOrMore, cl::init(5),
cl::desc("Set minimum jump tables"));
static cl::opt<int> MinimumJumpTables("minimum-jump-tables", cl::Hidden,
cl::init(5),
cl::desc("Set minimum jump tables"));
static cl::opt<int> MaxStoresPerMemcpyCL("max-store-memcpy",
cl::Hidden, cl::ZeroOrMore, cl::init(6),
cl::desc("Max #stores to inline memcpy"));
static cl::opt<int>
MaxStoresPerMemcpyCL("max-store-memcpy", cl::Hidden, cl::init(6),
cl::desc("Max #stores to inline memcpy"));
static cl::opt<int> MaxStoresPerMemcpyOptSizeCL("max-store-memcpy-Os",
cl::Hidden, cl::ZeroOrMore, cl::init(4),
cl::desc("Max #stores to inline memcpy"));
static cl::opt<int>
MaxStoresPerMemcpyOptSizeCL("max-store-memcpy-Os", cl::Hidden, cl::init(4),
cl::desc("Max #stores to inline memcpy"));
static cl::opt<int> MaxStoresPerMemmoveCL("max-store-memmove",
cl::Hidden, cl::ZeroOrMore, cl::init(6),
cl::desc("Max #stores to inline memmove"));
static cl::opt<int>
MaxStoresPerMemmoveCL("max-store-memmove", cl::Hidden, cl::init(6),
cl::desc("Max #stores to inline memmove"));
static cl::opt<int> MaxStoresPerMemmoveOptSizeCL("max-store-memmove-Os",
cl::Hidden, cl::ZeroOrMore, cl::init(4),
cl::desc("Max #stores to inline memmove"));
static cl::opt<int>
MaxStoresPerMemmoveOptSizeCL("max-store-memmove-Os", cl::Hidden,
cl::init(4),
cl::desc("Max #stores to inline memmove"));
static cl::opt<int> MaxStoresPerMemsetCL("max-store-memset",
cl::Hidden, cl::ZeroOrMore, cl::init(8),
cl::desc("Max #stores to inline memset"));
static cl::opt<int>
MaxStoresPerMemsetCL("max-store-memset", cl::Hidden, cl::init(8),
cl::desc("Max #stores to inline memset"));
static cl::opt<int> MaxStoresPerMemsetOptSizeCL("max-store-memset-Os",
cl::Hidden, cl::ZeroOrMore, cl::init(4),
cl::desc("Max #stores to inline memset"));
static cl::opt<int>
MaxStoresPerMemsetOptSizeCL("max-store-memset-Os", cl::Hidden, cl::init(4),
cl::desc("Max #stores to inline memset"));
static cl::opt<bool> AlignLoads("hexagon-align-loads",
cl::Hidden, cl::init(false),

View File

@ -77,9 +77,9 @@ cl::opt<bool> ScheduleInlineAsm("hexagon-sched-inline-asm", cl::Hidden,
static cl::opt<bool> EnableBranchPrediction("hexagon-enable-branch-prediction",
cl::Hidden, cl::init(true), cl::desc("Enable branch prediction"));
static cl::opt<bool> DisableNVSchedule("disable-hexagon-nv-schedule",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable schedule adjustment for new value stores."));
static cl::opt<bool> DisableNVSchedule(
"disable-hexagon-nv-schedule", cl::Hidden,
cl::desc("Disable schedule adjustment for new value stores."));
static cl::opt<bool> EnableTimingClassLatency(
"enable-timing-class-latency", cl::Hidden, cl::init(false),
@ -94,7 +94,8 @@ static cl::opt<bool> EnableACCForwarding(
cl::desc("Enable vec acc forwarding"));
static cl::opt<bool> BranchRelaxAsmLarge("branch-relax-asm-large",
cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("branch relax asm"));
cl::init(true), cl::Hidden,
cl::desc("branch relax asm"));
static cl::opt<bool> UseDFAHazardRec("dfa-hazard-rec",
cl::init(true), cl::Hidden, cl::ZeroOrMore,

View File

@ -56,21 +56,21 @@ using namespace llvm;
#define DEBUG_TYPE "hexagon-peephole"
static cl::opt<bool> DisableHexagonPeephole("disable-hexagon-peephole",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Peephole Optimization"));
static cl::opt<bool>
DisableHexagonPeephole("disable-hexagon-peephole", cl::Hidden,
cl::desc("Disable Peephole Optimization"));
static cl::opt<bool> DisablePNotP("disable-hexagon-pnotp",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Optimization of PNotP"));
static cl::opt<bool> DisablePNotP("disable-hexagon-pnotp", cl::Hidden,
cl::desc("Disable Optimization of PNotP"));
static cl::opt<bool> DisableOptSZExt("disable-hexagon-optszext",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Disable Optimization of Sign/Zero Extends"));
static cl::opt<bool>
DisableOptSZExt("disable-hexagon-optszext", cl::Hidden, cl::init(true),
cl::desc("Disable Optimization of Sign/Zero Extends"));
static cl::opt<bool> DisableOptExtTo64("disable-hexagon-opt-ext-to-64",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Disable Optimization of extensions to i64."));
static cl::opt<bool>
DisableOptExtTo64("disable-hexagon-opt-ext-to-64", cl::Hidden,
cl::init(true),
cl::desc("Disable Optimization of extensions to i64."));
namespace llvm {
FunctionPass *createHexagonPeephole();

View File

@ -39,45 +39,46 @@ using namespace llvm;
#define GET_SUBTARGETINFO_TARGET_DESC
#include "HexagonGenSubtargetInfo.inc"
static cl::opt<bool> EnableBSBSched("enable-bsb-sched",
cl::Hidden, cl::ZeroOrMore, cl::init(true));
static cl::opt<bool> EnableBSBSched("enable-bsb-sched", cl::Hidden,
cl::init(true));
static cl::opt<bool> EnableTCLatencySched("enable-tc-latency-sched",
cl::Hidden, cl::ZeroOrMore, cl::init(false));
static cl::opt<bool> EnableDotCurSched("enable-cur-sched",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Enable the scheduler to generate .cur"));
static cl::opt<bool>
EnableDotCurSched("enable-cur-sched", cl::Hidden, cl::init(true),
cl::desc("Enable the scheduler to generate .cur"));
static cl::opt<bool> DisableHexagonMISched("disable-hexagon-misched",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Hexagon MI Scheduling"));
static cl::opt<bool>
DisableHexagonMISched("disable-hexagon-misched", cl::Hidden,
cl::desc("Disable Hexagon MI Scheduling"));
static cl::opt<bool> EnableSubregLiveness("hexagon-subreg-liveness",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Enable subregister liveness tracking for Hexagon"));
static cl::opt<bool> EnableSubregLiveness(
"hexagon-subreg-liveness", cl::Hidden, cl::init(true),
cl::desc("Enable subregister liveness tracking for Hexagon"));
static cl::opt<bool> OverrideLongCalls("hexagon-long-calls",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("If present, forces/disables the use of long calls"));
static cl::opt<bool> OverrideLongCalls(
"hexagon-long-calls", cl::Hidden,
cl::desc("If present, forces/disables the use of long calls"));
static cl::opt<bool> EnablePredicatedCalls("hexagon-pred-calls",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Consider calls to be predicable"));
static cl::opt<bool>
EnablePredicatedCalls("hexagon-pred-calls", cl::Hidden,
cl::desc("Consider calls to be predicable"));
static cl::opt<bool> SchedPredsCloser("sched-preds-closer",
cl::Hidden, cl::ZeroOrMore, cl::init(true));
static cl::opt<bool> SchedPredsCloser("sched-preds-closer", cl::Hidden,
cl::init(true));
static cl::opt<bool> SchedRetvalOptimization("sched-retval-optimization",
cl::Hidden, cl::ZeroOrMore, cl::init(true));
static cl::opt<bool> EnableCheckBankConflict("hexagon-check-bank-conflict",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Enable checking for cache bank conflicts"));
static cl::opt<bool> EnableCheckBankConflict(
"hexagon-check-bank-conflict", cl::Hidden, cl::init(true),
cl::desc("Enable checking for cache bank conflicts"));
static cl::opt<bool> EnableV68FloatCodeGen(
"force-hvx-float", cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enable the code-generation for vector float instructions on v68."));
"force-hvx-float", cl::Hidden,
cl::desc(
"Enable the code-generation for vector float instructions on v68."));
HexagonSubtarget::HexagonSubtarget(const Triple &TT, StringRef CPU,
StringRef FS, const TargetMachine &TM)

View File

@ -32,8 +32,9 @@
using namespace llvm;
static cl::opt<bool> EnableCExtOpt("hexagon-cext", cl::Hidden, cl::ZeroOrMore,
cl::init(true), cl::desc("Enable Hexagon constant-extender optimization"));
static cl::opt<bool>
EnableCExtOpt("hexagon-cext", cl::Hidden, cl::init(true),
cl::desc("Enable Hexagon constant-extender optimization"));
static cl::opt<bool> EnableRDFOpt("rdf-opt", cl::Hidden, cl::ZeroOrMore,
cl::init(true), cl::desc("Enable RDF-based optimizations"));
@ -41,13 +42,13 @@ static cl::opt<bool> EnableRDFOpt("rdf-opt", cl::Hidden, cl::ZeroOrMore,
static cl::opt<bool> DisableHardwareLoops("disable-hexagon-hwloops",
cl::Hidden, cl::desc("Disable Hardware Loops for Hexagon target"));
static cl::opt<bool> DisableAModeOpt("disable-hexagon-amodeopt",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Hexagon Addressing Mode Optimization"));
static cl::opt<bool>
DisableAModeOpt("disable-hexagon-amodeopt", cl::Hidden,
cl::desc("Disable Hexagon Addressing Mode Optimization"));
static cl::opt<bool> DisableHexagonCFGOpt("disable-hexagon-cfgopt",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Disable Hexagon CFG Optimization"));
static cl::opt<bool>
DisableHexagonCFGOpt("disable-hexagon-cfgopt", cl::Hidden,
cl::desc("Disable Hexagon CFG Optimization"));
static cl::opt<bool> DisableHCP("disable-hcp", cl::init(false), cl::Hidden,
cl::ZeroOrMore, cl::desc("Disable Hexagon constant propagation"));
@ -56,8 +57,8 @@ static cl::opt<bool> DisableStoreWidening("disable-store-widen",
cl::Hidden, cl::init(false), cl::desc("Disable store widening"));
static cl::opt<bool> EnableExpandCondsets("hexagon-expand-condsets",
cl::init(true), cl::Hidden, cl::ZeroOrMore,
cl::desc("Early expansion of MUX"));
cl::init(true), cl::Hidden,
cl::desc("Early expansion of MUX"));
static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden,
cl::ZeroOrMore, cl::desc("Enable early if-conversion"));
@ -65,8 +66,9 @@ static cl::opt<bool> EnableEarlyIf("hexagon-eif", cl::init(true), cl::Hidden,
static cl::opt<bool> EnableGenInsert("hexagon-insert", cl::init(true),
cl::Hidden, cl::desc("Generate \"insert\" instructions"));
static cl::opt<bool> EnableCommGEP("hexagon-commgep", cl::init(true),
cl::Hidden, cl::ZeroOrMore, cl::desc("Enable commoning of GEP instructions"));
static cl::opt<bool>
EnableCommGEP("hexagon-commgep", cl::init(true), cl::Hidden,
cl::desc("Enable commoning of GEP instructions"));
static cl::opt<bool> EnableGenExtract("hexagon-extract", cl::init(true),
cl::Hidden, cl::desc("Generate \"extract\" instructions"));
@ -78,9 +80,9 @@ static cl::opt<bool> EnableGenPred("hexagon-gen-pred", cl::init(true),
cl::Hidden, cl::desc("Enable conversion of arithmetic operations to "
"predicate instructions"));
static cl::opt<bool> EnableLoopPrefetch("hexagon-loop-prefetch",
cl::init(false), cl::Hidden, cl::ZeroOrMore,
cl::desc("Enable loop data prefetch on Hexagon"));
static cl::opt<bool>
EnableLoopPrefetch("hexagon-loop-prefetch", cl::Hidden,
cl::desc("Enable loop data prefetch on Hexagon"));
static cl::opt<bool> DisableHSDR("disable-hsdr", cl::init(false), cl::Hidden,
cl::desc("Disable splitting double registers"));
@ -94,9 +96,9 @@ static cl::opt<bool> EnableLoopResched("hexagon-loop-resched", cl::init(true),
static cl::opt<bool> HexagonNoOpt("hexagon-noopt", cl::init(false),
cl::Hidden, cl::desc("Disable backend optimizations"));
static cl::opt<bool> EnableVectorPrint("enable-hexagon-vector-print",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enable Hexagon Vector print instr pass"));
static cl::opt<bool>
EnableVectorPrint("enable-hexagon-vector-print", cl::Hidden,
cl::desc("Enable Hexagon Vector print instr pass"));
static cl::opt<bool> EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden,
cl::ZeroOrMore, cl::init(true), cl::desc("Enable vextract optimization"));
@ -104,9 +106,9 @@ static cl::opt<bool> EnableVExtractOpt("hexagon-opt-vextract", cl::Hidden,
static cl::opt<bool> EnableVectorCombine("hexagon-vector-combine", cl::Hidden,
cl::ZeroOrMore, cl::init(true), cl::desc("Enable HVX vector combining"));
static cl::opt<bool> EnableInitialCFGCleanup("hexagon-initial-cfg-cleanup",
cl::Hidden, cl::ZeroOrMore, cl::init(true),
cl::desc("Simplify the CFG after atomic expansion pass"));
static cl::opt<bool> EnableInitialCFGCleanup(
"hexagon-initial-cfg-cleanup", cl::Hidden, cl::init(true),
cl::desc("Simplify the CFG after atomic expansion pass"));
static cl::opt<bool> EnableInstSimplify("hexagon-instsimplify", cl::Hidden,
cl::ZeroOrMore, cl::init(true),

View File

@ -41,9 +41,9 @@ static cl::opt<unsigned> SmallDataThreshold("hexagon-small-data-threshold",
static cl::opt<bool> NoSmallDataSorting("mno-sort-sda", cl::init(false),
cl::Hidden, cl::desc("Disable small data sections sorting"));
static cl::opt<bool> StaticsInSData("hexagon-statics-in-small-data",
cl::init(false), cl::Hidden, cl::ZeroOrMore,
cl::desc("Allow static variables in .sdata"));
static cl::opt<bool>
StaticsInSData("hexagon-statics-in-small-data", cl::Hidden,
cl::desc("Allow static variables in .sdata"));
static cl::opt<bool> TraceGVPlacement("trace-gv-placement",
cl::Hidden, cl::init(false),

View File

@ -27,9 +27,9 @@
using namespace llvm;
static cl::opt<unsigned> VExtractThreshold("hexagon-vextract-threshold",
cl::Hidden, cl::ZeroOrMore, cl::init(1),
cl::desc("Threshold for triggering vextract replacement"));
static cl::opt<unsigned> VExtractThreshold(
"hexagon-vextract-threshold", cl::Hidden, cl::init(1),
cl::desc("Threshold for triggering vextract replacement"));
namespace llvm {
void initializeHexagonVExtractPass(PassRegistry& Registry);

View File

@ -67,8 +67,9 @@ static cl::opt<bool> PacketizeVolatiles("hexagon-packetize-volatiles",
cl::ZeroOrMore, cl::Hidden, cl::init(true),
cl::desc("Allow non-solo packetization of volatile memory references"));
static cl::opt<bool> EnableGenAllInsnClass("enable-gen-insn", cl::init(false),
cl::Hidden, cl::ZeroOrMore, cl::desc("Generate all instruction with TC"));
static cl::opt<bool>
EnableGenAllInsnClass("enable-gen-insn", cl::Hidden,
cl::desc("Generate all instruction with TC"));
static cl::opt<bool> DisableVecDblNVStores("disable-vecdbl-nv-stores",
cl::init(false), cl::Hidden, cl::ZeroOrMore,

View File

@ -36,9 +36,9 @@ using namespace llvm;
#define DEBUG_TYPE "hexagon-vector-print"
static cl::opt<bool> TraceHexVectorStoresOnly("trace-hex-vector-stores-only",
cl::Hidden, cl::ZeroOrMore, cl::init(false),
cl::desc("Enables tracing of vector stores"));
static cl::opt<bool>
TraceHexVectorStoresOnly("trace-hex-vector-stores-only", cl::Hidden,
cl::desc("Enables tracing of vector stores"));
namespace llvm {

View File

@ -30,8 +30,8 @@
using namespace llvm;
static cl::opt<bool>
RelaxNVChecks("relax-nv-checks", cl::init(false), cl::ZeroOrMore,
cl::Hidden, cl::desc("Relax checks of new-value validity"));
RelaxNVChecks("relax-nv-checks", cl::Hidden,
cl::desc("Relax checks of new-value validity"));
const HexagonMCChecker::PredSense
HexagonMCChecker::Unconditional(Hexagon::NoRegister, false);

View File

@ -71,14 +71,14 @@ static cl::opt<bool> sched4reg(
"nvptx-sched4reg",
cl::desc("NVPTX Specific: schedule for register pressue"), cl::init(false));
static cl::opt<unsigned>
FMAContractLevelOpt("nvptx-fma-level", cl::ZeroOrMore, cl::Hidden,
cl::desc("NVPTX Specific: FMA contraction (0: don't do it"
" 1: do it 2: do it aggressively"),
cl::init(2));
static cl::opt<unsigned> FMAContractLevelOpt(
"nvptx-fma-level", cl::Hidden,
cl::desc("NVPTX Specific: FMA contraction (0: don't do it"
" 1: do it 2: do it aggressively"),
cl::init(2));
static cl::opt<int> UsePrecDivF32(
"nvptx-prec-divf32", cl::ZeroOrMore, cl::Hidden,
"nvptx-prec-divf32", cl::Hidden,
cl::desc("NVPTX Specifies: 0 use div.approx, 1 use div.full, 2 use"
" IEEE Compliant F32 div.rnd if available."),
cl::init(2));

View File

@ -23,7 +23,7 @@ using namespace llvm;
#include "NVPTXGenSubtargetInfo.inc"
static cl::opt<bool>
NoF16Math("nvptx-no-f16-math", cl::ZeroOrMore, cl::Hidden,
NoF16Math("nvptx-no-f16-math", cl::Hidden,
cl::desc("NVPTX Specific: Disable generation of f16 math ops."),
cl::init(false));

View File

@ -33,7 +33,7 @@ using namespace llvm;
#define DEBUG_TYPE "globaldce"
static cl::opt<bool>
ClEnableVFE("enable-vfe", cl::Hidden, cl::init(true), cl::ZeroOrMore,
ClEnableVFE("enable-vfe", cl::Hidden, cl::init(true),
cl::desc("Enable virtual function elimination"));
STATISTIC(NumAliases , "Number of global aliases removed");

View File

@ -99,7 +99,7 @@ static cl::opt<bool>
cl::init(false), cl::Hidden);
static cl::opt<int> ColdCCRelFreq(
"coldcc-rel-freq", cl::Hidden, cl::init(2), cl::ZeroOrMore,
"coldcc-rel-freq", cl::Hidden, cl::init(2),
cl::desc(
"Maximum block frequency, expressed as a percentage of caller's "
"entry frequency, for a call site to be considered cold for enabling"

View File

@ -58,17 +58,16 @@ using namespace omp;
#define DEBUG_TYPE "openmp-opt"
static cl::opt<bool> DisableOpenMPOptimizations(
"openmp-opt-disable", cl::ZeroOrMore,
cl::desc("Disable OpenMP specific optimizations."), cl::Hidden,
cl::init(false));
"openmp-opt-disable", cl::desc("Disable OpenMP specific optimizations."),
cl::Hidden, cl::init(false));
static cl::opt<bool> EnableParallelRegionMerging(
"openmp-opt-enable-merging", cl::ZeroOrMore,
"openmp-opt-enable-merging",
cl::desc("Enable the OpenMP region merging optimization."), cl::Hidden,
cl::init(false));
static cl::opt<bool>
DisableInternalization("openmp-opt-disable-internalization", cl::ZeroOrMore,
DisableInternalization("openmp-opt-disable-internalization",
cl::desc("Disable function internalization."),
cl::Hidden, cl::init(false));
@ -84,47 +83,47 @@ static cl::opt<bool> HideMemoryTransferLatency(
cl::Hidden, cl::init(false));
static cl::opt<bool> DisableOpenMPOptDeglobalization(
"openmp-opt-disable-deglobalization", cl::ZeroOrMore,
"openmp-opt-disable-deglobalization",
cl::desc("Disable OpenMP optimizations involving deglobalization."),
cl::Hidden, cl::init(false));
static cl::opt<bool> DisableOpenMPOptSPMDization(
"openmp-opt-disable-spmdization", cl::ZeroOrMore,
"openmp-opt-disable-spmdization",
cl::desc("Disable OpenMP optimizations involving SPMD-ization."),
cl::Hidden, cl::init(false));
static cl::opt<bool> DisableOpenMPOptFolding(
"openmp-opt-disable-folding", cl::ZeroOrMore,
"openmp-opt-disable-folding",
cl::desc("Disable OpenMP optimizations involving folding."), cl::Hidden,
cl::init(false));
static cl::opt<bool> DisableOpenMPOptStateMachineRewrite(
"openmp-opt-disable-state-machine-rewrite", cl::ZeroOrMore,
"openmp-opt-disable-state-machine-rewrite",
cl::desc("Disable OpenMP optimizations that replace the state machine."),
cl::Hidden, cl::init(false));
static cl::opt<bool> DisableOpenMPOptBarrierElimination(
"openmp-opt-disable-barrier-elimination", cl::ZeroOrMore,
"openmp-opt-disable-barrier-elimination",
cl::desc("Disable OpenMP optimizations that eliminate barriers."),
cl::Hidden, cl::init(false));
static cl::opt<bool> PrintModuleAfterOptimizations(
"openmp-opt-print-module-after", cl::ZeroOrMore,
"openmp-opt-print-module-after",
cl::desc("Print the current module after OpenMP optimizations."),
cl::Hidden, cl::init(false));
static cl::opt<bool> PrintModuleBeforeOptimizations(
"openmp-opt-print-module-before", cl::ZeroOrMore,
"openmp-opt-print-module-before",
cl::desc("Print the current module before OpenMP optimizations."),
cl::Hidden, cl::init(false));
static cl::opt<bool> AlwaysInlineDeviceFunctions(
"openmp-opt-inline-device", cl::ZeroOrMore,
"openmp-opt-inline-device",
cl::desc("Inline all applicible functions on the device."), cl::Hidden,
cl::init(false));
static cl::opt<bool>
EnableVerboseRemarks("openmp-opt-verbose-remarks", cl::ZeroOrMore,
EnableVerboseRemarks("openmp-opt-verbose-remarks",
cl::desc("Enables more verbose remarks."), cl::Hidden,
cl::init(false));

View File

@ -97,7 +97,7 @@ static cl::opt<bool>
// This is an option used by testing:
static cl::opt<bool> SkipCostAnalysis("skip-partial-inlining-cost-analysis",
cl::init(false), cl::ZeroOrMore,
cl::ReallyHidden,
cl::desc("Skip Cost Analysis"));
// Used to determine if a cold region is worth outlining based on
@ -127,7 +127,7 @@ static cl::opt<unsigned> MaxNumInlineBlocks(
// Command line option to set the maximum number of partial inlining allowed
// for the module. The default value of -1 means no limit.
static cl::opt<int> MaxNumPartialInlining(
"max-partial-inlining", cl::init(-1), cl::Hidden, cl::ZeroOrMore,
"max-partial-inlining", cl::init(-1), cl::Hidden,
cl::desc("Max number of partial inlining. The default is unlimited"));
// Used only when PGO or user annotated branch data is absent. It is

View File

@ -44,8 +44,7 @@
using namespace llvm;
namespace llvm {
cl::opt<bool> RunPartialInlining("enable-partial-inlining", cl::init(false),
cl::Hidden, cl::ZeroOrMore,
cl::opt<bool> RunPartialInlining("enable-partial-inlining", cl::Hidden,
cl::desc("Run Partial inlinining pass"));
static cl::opt<bool>
@ -115,12 +114,12 @@ cl::opt<bool>
cl::desc("Disable pre-instrumentation inliner"));
cl::opt<int> PreInlineThreshold(
"preinline-threshold", cl::Hidden, cl::init(75), cl::ZeroOrMore,
"preinline-threshold", cl::Hidden, cl::init(75),
cl::desc("Control the amount of inlining in pre-instrumentation inliner "
"(default = 75)"));
cl::opt<bool>
EnableGVNHoist("enable-gvn-hoist", cl::init(false), cl::ZeroOrMore,
EnableGVNHoist("enable-gvn-hoist",
cl::desc("Enable the GVN hoisting pass (default = off)"));
static cl::opt<bool>
@ -129,7 +128,7 @@ static cl::opt<bool>
cl::desc("Disable shrink-wrap library calls"));
cl::opt<bool>
EnableGVNSink("enable-gvn-sink", cl::init(false), cl::ZeroOrMore,
EnableGVNSink("enable-gvn-sink",
cl::desc("Enable the GVN sinking pass (default = off)"));
// This option is used in simplifying testing SampleFDO optimizations for

View File

@ -140,8 +140,7 @@ static cl::opt<bool> ProfileSampleBlockAccurate(
"them conservatively as unknown. "));
static cl::opt<bool> ProfileAccurateForSymsInList(
"profile-accurate-for-symsinlist", cl::Hidden, cl::ZeroOrMore,
cl::init(true),
"profile-accurate-for-symsinlist", cl::Hidden, cl::init(true),
cl::desc("For symbols in profile symbol list, regard their profiles to "
"be accurate. It may be overriden by profile-sample-accurate. "));
@ -217,19 +216,19 @@ static cl::opt<unsigned> ProfileICPRelativeHotnessSkip(
"Skip relative hotness check for ICP up to given number of targets."));
static cl::opt<bool> CallsitePrioritizedInline(
"sample-profile-prioritized-inline", cl::Hidden, cl::ZeroOrMore,
cl::init(false),
"sample-profile-prioritized-inline", cl::Hidden,
cl::desc("Use call site prioritized inlining for sample profile loader."
"Currently only CSSPGO is supported."));
static cl::opt<bool> UsePreInlinerDecision(
"sample-profile-use-preinliner", cl::Hidden, cl::ZeroOrMore,
cl::init(false),
"sample-profile-use-preinliner", cl::Hidden,
cl::desc("Use the preinliner decisions stored in profile context."));
static cl::opt<bool> AllowRecursiveInline(
"sample-profile-recursive-inline", cl::Hidden, cl::ZeroOrMore,
cl::init(false),
"sample-profile-recursive-inline", cl::Hidden,
cl::desc("Allow sample loader inliner to inline recursive calls."));
static cl::opt<std::string> ProfileInlineReplayFile(

View File

@ -48,12 +48,12 @@ cl::opt<int>
/// Initial synthetic count assigned to inline functions.
static cl::opt<int> InlineSyntheticCount(
"inline-synthetic-count", cl::Hidden, cl::init(15), cl::ZeroOrMore,
"inline-synthetic-count", cl::Hidden, cl::init(15),
cl::desc("Initial synthetic entry count for inline functions."));
/// Initial synthetic count assigned to cold functions.
static cl::opt<int> ColdSyntheticCount(
"cold-synthetic-count", cl::Hidden, cl::init(5), cl::ZeroOrMore,
"cold-synthetic-count", cl::Hidden, cl::init(5),
cl::desc("Initial synthetic entry count for cold functions."));
// Assign initial synthetic entry counts to functions.

View File

@ -182,7 +182,7 @@ static cl::list<std::string>
/// visibility may be compromised.
enum WPDCheckMode { None, Trap, Fallback };
static cl::opt<WPDCheckMode> DevirtCheckMode(
"wholeprogramdevirt-check", cl::Hidden, cl::ZeroOrMore,
"wholeprogramdevirt-check", cl::Hidden,
cl::desc("Type of checking for incorrect devirtualizations"),
cl::values(clEnumValN(WPDCheckMode::None, "none", "No checking"),
clEnumValN(WPDCheckMode::Trap, "trap", "Trap when incorrect"),

View File

@ -147,7 +147,7 @@ static cl::opt<bool> ClGenerateTagsWithCalls(
cl::init(false));
static cl::opt<bool> ClGlobals("hwasan-globals", cl::desc("Instrument globals"),
cl::Hidden, cl::init(false), cl::ZeroOrMore);
cl::Hidden, cl::init(false));
static cl::opt<int> ClMatchAllTag(
"hwasan-match-all-tag",

View File

@ -60,13 +60,13 @@ static cl::opt<bool> DisableICP("disable-icp", cl::init(false), cl::Hidden,
// value.
// For debug use only.
static cl::opt<unsigned>
ICPCutOff("icp-cutoff", cl::init(0), cl::Hidden, cl::ZeroOrMore,
ICPCutOff("icp-cutoff", cl::init(0), cl::Hidden,
cl::desc("Max number of promotions for this compilation"));
// If ICPCSSkip is non zero, the first ICPCSSkip callsites will be skipped.
// For debug use only.
static cl::opt<unsigned>
ICPCSSkip("icp-csskip", cl::init(0), cl::Hidden, cl::ZeroOrMore,
ICPCSSkip("icp-csskip", cl::init(0), cl::Hidden,
cl::desc("Skip Callsite up to this number for this compilation"));
// Set if the pass is called in LTO optimization. The difference for LTO mode

View File

@ -60,7 +60,7 @@ using namespace llvm;
namespace llvm {
cl::opt<bool>
DebugInfoCorrelate("debug-info-correlate", cl::ZeroOrMore,
DebugInfoCorrelate("debug-info-correlate",
cl::desc("Use debug info to correlate profiles."),
cl::init(false));
} // namespace llvm
@ -93,18 +93,18 @@ cl::opt<double> NumCountersPerValueSite(
cl::init(1.0));
cl::opt<bool> AtomicCounterUpdateAll(
"instrprof-atomic-counter-update-all", cl::ZeroOrMore,
"instrprof-atomic-counter-update-all",
cl::desc("Make all profile counter updates atomic (for testing only)"),
cl::init(false));
cl::opt<bool> AtomicCounterUpdatePromoted(
"atomic-counter-update-promoted", cl::ZeroOrMore,
"atomic-counter-update-promoted",
cl::desc("Do counter update using atomic fetch add "
" for promoted counters only"),
cl::init(false));
cl::opt<bool> AtomicFirstCounter(
"atomic-first-counter", cl::ZeroOrMore,
"atomic-first-counter",
cl::desc("Use atomic fetch add for first counter in a function (usually "
"the entry counter)"),
cl::init(false));
@ -114,7 +114,7 @@ cl::opt<bool> AtomicFirstCounter(
// pipeline is setup, i.e., the default value of true of this option
// does not mean the promotion will be done by default. Explicitly
// setting this option can override the default behavior.
cl::opt<bool> DoCounterPromotion("do-counter-promotion", cl::ZeroOrMore,
cl::opt<bool> DoCounterPromotion("do-counter-promotion",
cl::desc("Do counter register promotion"),
cl::init(false));
cl::opt<unsigned> MaxNumOfPromotionsPerLoop(

View File

@ -172,14 +172,14 @@ static cl::opt<bool> DisableValueProfiling("disable-vp", cl::init(false),
// Command line option to set the maximum number of VP annotations to write to
// the metadata for a single indirect call callsite.
static cl::opt<unsigned> MaxNumAnnotations(
"icp-max-annotations", cl::init(3), cl::Hidden, cl::ZeroOrMore,
"icp-max-annotations", cl::init(3), cl::Hidden,
cl::desc("Max number of annotations for a single indirect "
"call callsite"));
// Command line option to set the maximum number of value annotations
// to write to the metadata for a single memop intrinsic.
static cl::opt<unsigned> MaxNumMemOPAnnotations(
"memop-max-annotations", cl::init(4), cl::Hidden, cl::ZeroOrMore,
"memop-max-annotations", cl::init(4), cl::Hidden,
cl::desc("Max number of preicise value annotations for a single memop"
"intrinsic"));
@ -255,7 +255,7 @@ static cl::opt<bool> PGOInstrumentEntry(
cl::desc("Force to instrument function entry basicblock."));
static cl::opt<bool> PGOFunctionEntryCoverage(
"pgo-function-entry-coverage", cl::init(false), cl::Hidden, cl::ZeroOrMore,
"pgo-function-entry-coverage", cl::Hidden,
cl::desc(
"Use this option to enable function entry coverage instrumentation."));

View File

@ -56,8 +56,7 @@ STATISTIC(NumOfPGOMemOPAnnotate, "Number of memop intrinsics annotated.");
// The minimum call count to optimize memory intrinsic calls.
static cl::opt<unsigned>
MemOPCountThreshold("pgo-memop-count-threshold", cl::Hidden, cl::ZeroOrMore,
cl::init(1000),
MemOPCountThreshold("pgo-memop-count-threshold", cl::Hidden, cl::init(1000),
cl::desc("The minimum count to optimize memory "
"intrinsic calls"));

View File

@ -111,12 +111,12 @@ GVNEnableSplitBackedgeInLoadPRE("enable-split-backedge-in-load-pre",
static cl::opt<bool> GVNEnableMemDep("enable-gvn-memdep", cl::init(true));
static cl::opt<uint32_t> MaxNumDeps(
"gvn-max-num-deps", cl::Hidden, cl::init(100), cl::ZeroOrMore,
"gvn-max-num-deps", cl::Hidden, cl::init(100),
cl::desc("Max number of dependences to attempt Load PRE (default = 100)"));
// This is based on IsValueFullyAvailableInBlockNumSpeculationsMax stat.
static cl::opt<uint32_t> MaxBBSpeculations(
"gvn-max-block-speculations", cl::Hidden, cl::init(600), cl::ZeroOrMore,
"gvn-max-block-speculations", cl::Hidden, cl::init(600),
cl::desc("Max number of blocks we're willing to speculate on (and recurse "
"into) when deducing if a value is fully available or not in GVN "
"(default = 600)"));

View File

@ -132,7 +132,7 @@ static cl::opt<bool> UnrollAllowRemainder(
"when unrolling a loop."));
static cl::opt<bool>
UnrollRuntime("unroll-runtime", cl::ZeroOrMore, cl::Hidden,
UnrollRuntime("unroll-runtime", cl::Hidden,
cl::desc("Unroll loops with run-time trip counts"));
static cl::opt<unsigned> UnrollMaxUpperBound(

View File

@ -33,15 +33,15 @@ static cl::opt<bool> SampleProfileEvenCountDistribution(
"likely options."));
static cl::opt<unsigned> SampleProfileMaxDfsCalls(
"sample-profile-max-dfs-calls", cl::init(10), cl::Hidden, cl::ZeroOrMore,
"sample-profile-max-dfs-calls", cl::init(10), cl::Hidden,
cl::desc("Maximum number of dfs iterations for even count distribution."));
static cl::opt<unsigned> SampleProfileProfiCostInc(
"sample-profile-profi-cost-inc", cl::init(10), cl::Hidden, cl::ZeroOrMore,
"sample-profile-profi-cost-inc", cl::init(10), cl::Hidden,
cl::desc("A cost of increasing a block's count by one."));
static cl::opt<unsigned> SampleProfileProfiCostDec(
"sample-profile-profi-cost-dec", cl::init(20), cl::Hidden, cl::ZeroOrMore,
"sample-profile-profi-cost-dec", cl::init(20), cl::Hidden,
cl::desc("A cost of decreasing a block's count by one."));
static cl::opt<unsigned> SampleProfileProfiCostIncZero(

View File

@ -39,7 +39,7 @@ cl::opt<bool> NoWarnSampleUnused(
"samples but without debug information to use those samples. "));
cl::opt<bool> SampleProfileUseProfi(
"sample-profile-use-profi", cl::init(false), cl::Hidden, cl::ZeroOrMore,
"sample-profile-use-profi", cl::Hidden,
cl::desc("Use profi to infer block and edge counts."));
cl::opt<bool> SampleProfileInferEntryCount(

View File

@ -91,8 +91,8 @@ using namespace PatternMatch;
#define DEBUG_TYPE "simplifycfg"
cl::opt<bool> llvm::RequireAndPreserveDomTree(
"simplifycfg-require-and-preserve-domtree", cl::Hidden, cl::ZeroOrMore,
cl::init(false),
"simplifycfg-require-and-preserve-domtree", cl::Hidden,
cl::desc("Temorary development switch used to gradually uplift SimplifyCFG "
"into preserving DomTree,"));

View File

@ -48,12 +48,12 @@ cl::opt<bool> llvm::ForcePGSO(
cl::desc("Force the (profiled-guided) size optimizations. "));
cl::opt<int> llvm::PgsoCutoffInstrProf(
"pgso-cutoff-instr-prof", cl::Hidden, cl::init(950000), cl::ZeroOrMore,
"pgso-cutoff-instr-prof", cl::Hidden, cl::init(950000),
cl::desc("The profile guided size optimization profile summary cutoff "
"for instrumentation profile."));
cl::opt<int> llvm::PgsoCutoffSampleProf(
"pgso-cutoff-sample-prof", cl::Hidden, cl::init(990000), cl::ZeroOrMore,
"pgso-cutoff-sample-prof", cl::Hidden, cl::init(990000),
cl::desc("The profile guided size optimization profile summary cutoff "
"for sample profile."));

View File

@ -979,7 +979,7 @@ static int merge_main(int argc, const char *argv[]) {
cl::desc(
"Trim context sample profiles whose count is below cold threshold"));
cl::opt<uint32_t> SampleColdContextFrameDepth(
"sample-frame-depth-for-cold-context", cl::init(1), cl::ZeroOrMore,
"sample-frame-depth-for-cold-context", cl::init(1),
cl::desc("Keep the last K frames while merging cold profile. 1 means the "
"context-less base profile"));
cl::opt<bool> GenPartialProfile(

View File

@ -24,19 +24,19 @@ static cl::opt<bool> ShowMmapEvents("show-mmap-events", cl::init(false),
cl::desc("Print binary load events."));
static cl::opt<bool>
UseOffset("use-offset", cl::init(true), cl::ZeroOrMore,
UseOffset("use-offset", cl::init(true),
cl::desc("Work with `--skip-symbolization` or "
"`--unsymbolized-profile` to write/read the "
"offset instead of virtual address."));
static cl::opt<bool> UseLoadableSegmentAsBase(
"use-first-loadable-segment-as-base", cl::init(false), cl::ZeroOrMore,
"use-first-loadable-segment-as-base",
cl::desc("Use first loadable segment address as base address "
"for offsets in unsymbolized profile. By default "
"first executable segment address is used"));
static cl::opt<bool>
IgnoreStackSamples("ignore-stack-samples", cl::init(false), cl::ZeroOrMore,
IgnoreStackSamples("ignore-stack-samples",
cl::desc("Ignore call stack samples for hybrid samples "
"and produce context-insensitive profile."));
cl::opt<bool> ShowDetailedWarning("show-detailed-warning", cl::init(false),

View File

@ -54,23 +54,23 @@ static cl::opt<int32_t, true> RecursionCompression(
cl::location(llvm::sampleprof::CSProfileGenerator::MaxCompressionSize));
static cl::opt<bool>
TrimColdProfile("trim-cold-profile", cl::init(false), cl::ZeroOrMore,
TrimColdProfile("trim-cold-profile",
cl::desc("If the total count of the profile is smaller "
"than threshold, it will be trimmed."));
static cl::opt<bool> CSProfMergeColdContext(
"csprof-merge-cold-context", cl::init(true), cl::ZeroOrMore,
"csprof-merge-cold-context", cl::init(true),
cl::desc("If the total count of context profile is smaller than "
"the threshold, it will be merged into context-less base "
"profile."));
static cl::opt<uint32_t> CSProfMaxColdContextDepth(
"csprof-max-cold-context-depth", cl::init(1), cl::ZeroOrMore,
"csprof-max-cold-context-depth", cl::init(1),
cl::desc("Keep the last K contexts while merging cold profile. 1 means the "
"context-less base profile"));
static cl::opt<int, true> CSProfMaxContextDepth(
"csprof-max-context-depth", cl::ZeroOrMore,
"csprof-max-context-depth",
cl::desc("Keep the last K contexts while merging profile. -1 means no "
"depth limit."),
cl::location(llvm::sampleprof::CSProfileGenerator::MaxContextDepth));

View File

@ -32,20 +32,20 @@ cl::opt<bool> ShowSourceLocations("show-source-locations", cl::init(false),
cl::desc("Print source locations."));
static cl::opt<bool>
ShowCanonicalFnName("show-canonical-fname", cl::init(false), cl::ZeroOrMore,
ShowCanonicalFnName("show-canonical-fname",
cl::desc("Print canonical function name."));
static cl::opt<bool> ShowPseudoProbe(
"show-pseudo-probe", cl::init(false), cl::ZeroOrMore,
"show-pseudo-probe",
cl::desc("Print pseudo probe section and disassembled info."));
static cl::opt<bool> UseDwarfCorrelation(
"use-dwarf-correlation", cl::init(false), cl::ZeroOrMore,
"use-dwarf-correlation",
cl::desc("Use dwarf for profile correlation even when binary contains "
"pseudo probe."));
static cl::opt<std::string>
DWPPath("dwp", cl::init(""), cl::ZeroOrMore,
DWPPath("dwp", cl::init(""),
cl::desc("Path of .dwp file. When not specified, it will be "
"<binary>.dwp in the same directory as the main binary."));

View File

@ -23,7 +23,7 @@
static cl::OptionCategory ProfGenCategory("ProfGen Options");
static cl::opt<std::string> PerfScriptFilename(
"perfscript", cl::value_desc("perfscript"), cl::ZeroOrMore,
"perfscript", cl::value_desc("perfscript"),
llvm::cl::MiscFlags::CommaSeparated,
cl::desc("Path of perf-script trace created by Linux perf tool with "
"`script` command(the raw perf.data should be profiled with -b)"),
@ -32,8 +32,7 @@ static cl::alias PSA("ps", cl::desc("Alias for --perfscript"),
cl::aliasopt(PerfScriptFilename));
static cl::opt<std::string> PerfDataFilename(
"perfdata", cl::value_desc("perfdata"), cl::ZeroOrMore,
llvm::cl::MiscFlags::CommaSeparated,
"perfdata", cl::value_desc("perfdata"), llvm::cl::MiscFlags::CommaSeparated,
cl::desc("Path of raw perf data created by Linux perf tool (it should be "
"profiled with -b)"),
cl::cat(ProfGenCategory));
@ -61,12 +60,12 @@ static cl::opt<std::string>
cl::cat(ProfGenCategory));
static cl::opt<uint32_t>
ProcessId("pid", cl::value_desc("process Id"), cl::ZeroOrMore, cl::init(0),
ProcessId("pid", cl::value_desc("process Id"), cl::init(0),
cl::desc("Process Id for the profiled executable binary."),
cl::cat(ProfGenCategory));
static cl::opt<std::string> DebugBinPath(
"debug-binary", cl::value_desc("debug-binary"), cl::ZeroOrMore,
"debug-binary", cl::value_desc("debug-binary"),
cl::desc("Path of debug info binary, llvm-profgen will load the DWARF info "
"from it instead of the executable binary."),
cl::cat(ProfGenCategory));

View File

@ -81,7 +81,7 @@ static cl::opt<bool> AllowEmptyInput(
"checks that some error message does not occur, for example."));
static cl::opt<bool> AllowUnusedPrefixes(
"allow-unused-prefixes", cl::init(false), cl::ZeroOrMore,
"allow-unused-prefixes",
cl::desc("Allow prefixes to be specified but not appear in the test."));
static cl::opt<bool> MatchFullLines(
@ -104,12 +104,12 @@ static cl::opt<bool> AllowDeprecatedDagOverlap(
"non-overlapping CHECK-DAG implementation.\n"));
static cl::opt<bool> Verbose(
"v", cl::init(false), cl::ZeroOrMore,
"v",
cl::desc("Print directive pattern matches, or add them to the input dump\n"
"if enabled.\n"));
static cl::opt<bool> VerboseVerbose(
"vv", cl::init(false), cl::ZeroOrMore,
"vv",
cl::desc("Print information helpful in diagnosing internal FileCheck\n"
"issues, or add it to the input dump if enabled. Implies\n"
"-v.\n"));