From: Fangrui Song Date: Sat, 4 Jun 2022 07:10:42 +0000 (-0700) Subject: Remove unneeded cl::ZeroOrMore for cl::opt options X-Git-Tag: upstream/15.0.7~5859 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36c7d79dc4c114728b5f003bf48cd7a41bf932a4;p=platform%2Fupstream%2Fllvm.git Remove unneeded cl::ZeroOrMore for cl::opt options Similar to 557efc9a8b68628c2c944678c6471dac30ed9e8e. This commit handles options where cl::ZeroOrMore is more than one line below cl::opt. --- diff --git a/bolt/lib/Passes/IndirectCallPromotion.cpp b/bolt/lib/Passes/IndirectCallPromotion.cpp index efb74e8..1ca29f4 100644 --- a/bolt/lib/Passes/IndirectCallPromotion.cpp +++ b/bolt/lib/Passes/IndirectCallPromotion.cpp @@ -50,7 +50,7 @@ static cl::opt ICPCallsRemainingPercentThreshold( "icp-calls-remaining-percent-threshold", cl::desc("The percentage threshold against remaining unpromoted indirect " "call count for the promotion for calls"), - cl::init(50), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + cl::init(50), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ICPCallsTotalPercentThreshold( "icp-calls-total-percent-threshold", @@ -63,7 +63,7 @@ static cl::opt ICPMispredictThreshold( "indirect-call-promotion-mispredict-threshold", cl::desc("misprediction threshold for skipping ICP on an " "indirect call"), - cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(0), cl::cat(BoltOptCategory)); static cl::opt ICPUseMispredicts( "indirect-call-promotion-use-mispredicts", @@ -77,31 +77,31 @@ static cl::opt ICPTopN("indirect-call-promotion-topn", cl::desc("limit number of targets to consider when doing indirect " "call promotion. 0 = no limit"), - cl::init(3), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(3), cl::cat(BoltOptCategory)); static cl::opt ICPCallsTopN( "indirect-call-promotion-calls-topn", cl::desc("limit number of targets to consider when doing indirect " "call promotion on calls. 0 = no limit"), - cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(0), cl::cat(BoltOptCategory)); static cl::opt ICPJumpTablesTopN( "indirect-call-promotion-jump-tables-topn", cl::desc("limit number of targets to consider when doing indirect " "call promotion on jump tables. 0 = no limit"), - cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(0), cl::cat(BoltOptCategory)); static cl::opt EliminateLoads( "icp-eliminate-loads", cl::desc("enable load elimination using memory profiling data when " "performing ICP"), - cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(true), cl::cat(BoltOptCategory)); static cl::opt ICPTopCallsites( "icp-top-callsites", cl::desc("optimize hottest calls until at least this percentage of all " "indirect calls frequency is covered. 0 = all callsites"), - cl::init(99), cl::Hidden, cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(99), cl::Hidden, cl::cat(BoltOptCategory)); static cl::list ICPFuncsList("icp-funcs", cl::CommaSeparated, @@ -112,18 +112,17 @@ static cl::list static cl::opt ICPOldCodeSequence("icp-old-code-sequence", cl::desc("use old code sequence for promoted calls"), - cl::init(false), cl::ZeroOrMore, cl::Hidden, - cl::cat(BoltOptCategory)); + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ICPJumpTablesByTarget( "icp-jump-tables-targets", cl::desc( "for jump tables, optimize indirect jmp targets instead of indices"), - cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ICPPeelForInline( "icp-inline", cl::desc("only promote call targets eligible for inlining"), - cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + cl::Hidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Passes/TailDuplication.cpp b/bolt/lib/Passes/TailDuplication.cpp index c4062a7..e86fe1a 100644 --- a/bolt/lib/Passes/TailDuplication.cpp +++ b/bolt/lib/Passes/TailDuplication.cpp @@ -66,13 +66,13 @@ static cl::opt TailDuplicationConstCopyPropagation( static cl::opt TailDuplicationMaxCacheDistance( "tail-duplication-max-cache-distance", cl::desc("The weight of backward jumps for ExtTSP value"), cl::init(256), - cl::ReallyHidden, cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::ReallyHidden, cl::cat(BoltOptCategory)); static cl::opt TailDuplicationCacheBackwardWeight( "tail-duplication-cache-backward-weight", cl::desc( "The maximum distance (in bytes) of backward jumps for ExtTSP value"), - cl::init(0.5), cl::ReallyHidden, cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(0.5), cl::ReallyHidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp index 14741c4..5a75839 100644 --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -55,9 +55,9 @@ DynoStatsAll("dyno-stats-all", cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); static cl::opt -EliminateUnreachable("eliminate-unreachable", - cl::desc("eliminate unreachable code"), - cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + EliminateUnreachable("eliminate-unreachable", + cl::desc("eliminate unreachable code"), cl::init(true), + cl::cat(BoltOptCategory)); cl::opt ICF("icf", @@ -70,10 +70,8 @@ JTFootprintReductionFlag("jt-footprint-reduction", "instructions at jump sites"), cl::ZeroOrMore, cl::cat(BoltOptCategory)); -cl::opt -NeverPrint("never-print", - cl::desc("never print"), - cl::init(false), cl::ZeroOrMore, cl::ReallyHidden, cl::cat(BoltOptCategory)); +cl::opt NeverPrint("never-print", cl::desc("never print"), + cl::ReallyHidden, cl::cat(BoltOptCategory)); cl::opt PrintAfterBranchFixup("print-after-branch-fixup", @@ -160,10 +158,10 @@ PrintReorderedFunctions("print-reordered-functions", cl::desc("print functions after clustering"), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -PrintRetpolineInsertion("print-retpoline-insertion", - cl::desc("print functions after retpoline insertion pass"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltCategory)); +static cl::opt PrintRetpolineInsertion( + "print-retpoline-insertion", + cl::desc("print functions after retpoline insertion pass"), + cl::cat(BoltCategory)); static cl::opt PrintSCTC("print-sctc", @@ -181,29 +179,29 @@ PrintSplit("print-split", cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintStoke("print-stoke", - cl::desc("print functions after stoke analysis"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + PrintStoke("print-stoke", cl::desc("print functions after stoke analysis"), + cl::cat(BoltOptCategory)); -static cl::opt -PrintVeneerElimination("print-veneer-elimination", - cl::desc("print functions after veneer elimination pass"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt PrintVeneerElimination( + "print-veneer-elimination", + cl::desc("print functions after veneer elimination pass"), + cl::cat(BoltOptCategory)); static cl::opt PrintUCE("print-uce", cl::desc("print functions after unreachable code elimination"), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -RegReAssign("reg-reassign", - cl::desc("reassign registers so as to avoid using REX prefixes in hot code"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt RegReAssign( + "reg-reassign", + cl::desc( + "reassign registers so as to avoid using REX prefixes in hot code"), + cl::cat(BoltOptCategory)); -static cl::opt -SimplifyConditionalTailCalls("simplify-conditional-tail-calls", - cl::desc("simplify conditional tail calls by removing unnecessary jumps"), - cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt SimplifyConditionalTailCalls( + "simplify-conditional-tail-calls", + cl::desc("simplify conditional tail calls by removing unnecessary jumps"), + cl::init(true), cl::cat(BoltOptCategory)); static cl::opt SimplifyRODataLoads("simplify-rodata-loads", @@ -218,25 +216,22 @@ SpecializeMemcpy1("memcpy1-spec", cl::value_desc("func1,func2:cs1:cs2,func3:cs1,..."), cl::ZeroOrMore, cl::cat(BoltOptCategory)); -static cl::opt -Stoke("stoke", - cl::desc("turn on the stoke analysis"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt Stoke("stoke", cl::desc("turn on the stoke analysis"), + cl::cat(BoltOptCategory)); -static cl::opt -StringOps("inline-memcpy", - cl::desc("inline memcpy using 'rep movsb' instruction (X86-only)"), - cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt StringOps( + "inline-memcpy", + cl::desc("inline memcpy using 'rep movsb' instruction (X86-only)"), + cl::cat(BoltOptCategory)); -static cl::opt -StripRepRet("strip-rep-ret", - cl::desc("strip 'repz' prefix from 'repz retq' sequence (on by default)"), - cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt StripRepRet( + "strip-rep-ret", + cl::desc("strip 'repz' prefix from 'repz retq' sequence (on by default)"), + cl::init(true), cl::cat(BoltOptCategory)); -static cl::opt -VerifyCFG("verify-cfg", - cl::desc("verify the CFG after every pass"), - cl::init(false), cl::Hidden, cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt VerifyCFG("verify-cfg", + cl::desc("verify the CFG after every pass"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ThreeWayBranchFlag("three-way-branch", diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index d19dc67..0f1d642 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -275,8 +275,8 @@ TrapOldCode("trap-old-code", static cl::opt DWPPathName("dwp", cl::desc("Path and name to DWP file."), - cl::Hidden, cl::ZeroOrMore, - cl::init(""), cl::cat(BoltCategory)); + cl::Hidden, cl::init(""), + cl::cat(BoltCategory)); static cl::opt UseGnuStack("use-gnu-stack", diff --git a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp index d5a5023..4acd6c9 100644 --- a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp @@ -35,7 +35,7 @@ cl::opt static cl::opt RuntimeHugifyLib( "runtime-hugify-lib", - cl::desc("specify file name of the runtime hugify library"), cl::ZeroOrMore, + cl::desc("specify file name of the runtime hugify library"), cl::init("libbolt_rt_hugify.a"), cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index 7f968aa..f7c1fa9 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -50,7 +50,7 @@ AlignText("align-text", cl::opt AlignFunctions( "align-functions", cl::desc("align functions at a given value (relocation mode)"), - cl::init(64), cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::init(64), cl::cat(BoltOptCategory)); cl::opt AggregateOnly("aggregate-only", diff --git a/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp b/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp index 5b2a0b6..d5ef6e5 100644 --- a/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp +++ b/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp @@ -183,7 +183,7 @@ static cl::opt EntryPointName("entry", cl::desc("Symbol to call as main entry point"), cl::init("entry")); -static cl::list InputObjects(cl::Positional, cl::ZeroOrMore, +static cl::list InputObjects(cl::Positional, cl::desc("input objects")); int main(int argc, char *argv[]) { diff --git a/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp b/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp index ca90882..ebfa1c8 100644 --- a/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp +++ b/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp @@ -34,7 +34,7 @@ static cl::opt ICPRemainingPercentThreshold( // total call count) for it to be considered as the promotion target. static cl::opt ICPTotalPercentThreshold("icp-total-percent-threshold", cl::init(5), - cl::Hidden, cl::ZeroOrMore, + cl::Hidden, cl::desc("The percentage threshold against total " "count for the promotion")); diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 76523ef..33cff7c 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -78,7 +78,7 @@ static cl::opt HintThreshold( static cl::opt ColdCallSiteThreshold("inline-cold-callsite-threshold", cl::Hidden, - cl::init(45), cl::ZeroOrMore, + cl::init(45), cl::desc("Threshold for inlining cold callsites")); static cl::opt InlineEnableCostBenefitAnalysis( diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp index 15d1621..6400a88 100644 --- a/llvm/lib/CodeGen/MachinePipeliner.cpp +++ b/llvm/lib/CodeGen/MachinePipeliner.cpp @@ -169,10 +169,9 @@ static cl::opt ExperimentalCodeGen( namespace llvm { // A command line option to enable the CopyToPhi DAG mutation. -cl::opt - SwpEnableCopyToPhi("pipeliner-enable-copytophi", cl::ReallyHidden, - cl::init(true), cl::ZeroOrMore, - cl::desc("Enable CopyToPhi DAG Mutation")); +cl::opt SwpEnableCopyToPhi("pipeliner-enable-copytophi", cl::ReallyHidden, + cl::init(true), + cl::desc("Enable CopyToPhi DAG Mutation")); } // end namespace llvm diff --git a/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp b/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp index e5deb55..755e25b 100644 --- a/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp +++ b/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp @@ -41,14 +41,14 @@ cl::opt ProfileSummaryCutoffCold( cl::opt ProfileSummaryHugeWorkingSetSizeThreshold( "profile-summary-huge-working-set-size-threshold", cl::Hidden, - cl::init(15000), cl::ZeroOrMore, + cl::init(15000), cl::desc("The code working set size is considered huge if the number of" " blocks required to reach the -profile-summary-cutoff-hot" " percentile exceeds this count.")); cl::opt ProfileSummaryLargeWorkingSetSizeThreshold( "profile-summary-large-working-set-size-threshold", cl::Hidden, - cl::init(12500), cl::ZeroOrMore, + cl::init(12500), cl::desc("The code working set size is considered large if the number of" " blocks required to reach the -profile-summary-cutoff-hot" " percentile exceeds this count.")); diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp index 5470d93..98a9ac4 100644 --- a/llvm/lib/Support/Debug.cpp +++ b/llvm/lib/Support/Debug.cpp @@ -132,7 +132,7 @@ struct CreateDebugOnly { "debug-only", cl::desc("Enable a specific type of debug output (comma separated list " "of types)"), - cl::Hidden, cl::ZeroOrMore, cl::value_desc("debug string"), + cl::Hidden, cl::value_desc("debug string"), cl::location(DebugOnlyOptLoc), cl::ValueRequired); } }; diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp index ba75071..89c0e42 100644 --- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp +++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp @@ -70,7 +70,7 @@ static cl::opt ClMergeInit( static cl::opt ClUseStackSafety("stack-tagging-use-stack-safety", cl::Hidden, - cl::init(true), cl::ZeroOrMore, + cl::init(true), cl::desc("Use Stack Safety analysis results")); static cl::opt ClScanLimit("stack-tagging-merge-init-scan-limit", diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index cb69aaa..8893ffe 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -156,17 +156,19 @@ static cl::opt NumberScavengerSlots("number-scavenger-slots", cl::Hidden, cl::desc("Set the number of scavenger slots"), cl::init(2), cl::ZeroOrMore); -static cl::opt SpillFuncThreshold("spill-func-threshold", - cl::Hidden, cl::desc("Specify O2(not Os) spill func threshold"), - cl::init(6), cl::ZeroOrMore); +static cl::opt + SpillFuncThreshold("spill-func-threshold", cl::Hidden, + cl::desc("Specify O2(not Os) spill func threshold"), + cl::init(6)); -static cl::opt SpillFuncThresholdOs("spill-func-threshold-Os", - cl::Hidden, cl::desc("Specify Os spill func threshold"), - cl::init(1), cl::ZeroOrMore); +static cl::opt + SpillFuncThresholdOs("spill-func-threshold-Os", cl::Hidden, + cl::desc("Specify Os spill func threshold"), + cl::init(1)); -static cl::opt EnableStackOVFSanitizer("enable-stackovf-sanitizer", - cl::Hidden, cl::desc("Enable runtime checks for stack overflow."), - cl::init(false), cl::ZeroOrMore); +static cl::opt EnableStackOVFSanitizer( + "enable-stackovf-sanitizer", cl::Hidden, + cl::desc("Enable runtime checks for stack overflow."), cl::init(false)); static cl::opt EnableShrinkWrapping("hexagon-shrink-frame", cl::init(true), cl::Hidden, @@ -177,9 +179,10 @@ static cl::opt cl::init(std::numeric_limits::max()), cl::Hidden, cl::desc("Max count of stack frame shrink-wraps")); -static cl::opt EnableSaveRestoreLong("enable-save-restore-long", - cl::Hidden, cl::desc("Enable long calls for save-restore stubs."), - cl::init(false), cl::ZeroOrMore); +static cl::opt + EnableSaveRestoreLong("enable-save-restore-long", cl::Hidden, + cl::desc("Enable long calls for save-restore stubs."), + cl::init(false)); static cl::opt EliminateFramePointer("hexagon-fp-elim", cl::init(true), cl::Hidden, cl::desc("Refrain from using FP whenever possible")); diff --git a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp index b2ad757..4a801e5 100644 --- a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp +++ b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp @@ -65,7 +65,7 @@ static cl::opt MaxIFMSize("insert-max-ifmap", cl::init(1024), cl::Hidden, cl::desc("Maximum size of IFMap")); -static cl::opt OptTiming("insert-timing", cl::Hidden, cl::ZeroOrMore, +static cl::opt OptTiming("insert-timing", cl::Hidden, cl::desc("Enable timing of insert generation")); static cl::opt OptTimingDetail("insert-timing-detail", cl::Hidden, diff --git a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp index 94b878e..2b004a9 100644 --- a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp +++ b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp @@ -53,10 +53,10 @@ using namespace llvm; STATISTIC(HexagonNumVectorLoopCarriedReuse, "Number of values that were reused from a previous iteration."); -static cl::opt HexagonVLCRIterationLim("hexagon-vlcr-iteration-lim", - cl::Hidden, +static cl::opt HexagonVLCRIterationLim( + "hexagon-vlcr-iteration-lim", cl::Hidden, cl::desc("Maximum distance of loop carried dependences that are handled"), - cl::init(2), cl::ZeroOrMore); + cl::init(2)); namespace llvm { diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp index c0e30f06..bf7dd09 100644 --- a/llvm/lib/Transforms/IPO/PartialInlining.cpp +++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp @@ -135,7 +135,7 @@ static cl::opt MaxNumPartialInlining( // produces larger value, the BFI value will be used. static cl::opt OutlineRegionFreqPercent("outline-region-freq-percent", cl::init(75), - cl::Hidden, cl::ZeroOrMore, + cl::Hidden, cl::desc("Relative frequency of outline region to " "the entry block")); diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index 51d9bac..8396968 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -144,13 +144,12 @@ static cl::opt ClWriteSummary( static cl::opt ClThreshold("wholeprogramdevirt-branch-funnel-threshold", cl::Hidden, - cl::init(10), cl::ZeroOrMore, + cl::init(10), cl::desc("Maximum number of call targets per " "call site to enable branch funnels")); static cl::opt PrintSummaryDevirt("wholeprogramdevirt-print-index-based", cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::desc("Print index-based devirtualization messages")); /// Provide a way to force enable whole program visibility in tests. @@ -158,8 +157,7 @@ static cl::opt /// !vcall_visibility metadata (the mere presense of type tests /// previously implied hidden visibility). static cl::opt - WholeProgramVisibility("whole-program-visibility", cl::init(false), - cl::Hidden, cl::ZeroOrMore, + WholeProgramVisibility("whole-program-visibility", cl::Hidden, cl::desc("Enable whole program visibility")); /// Provide a way to force disable whole program for debugging or workarounds, diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 6ddade5..1842f73 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -193,12 +193,12 @@ static cl::opt static cl::opt ClInstrumentLandingPads("hwasan-instrument-landing-pads", cl::desc("instrument landing pads"), cl::Hidden, - cl::init(false), cl::ZeroOrMore); + cl::init(false)); static cl::opt ClUseShortGranules( "hwasan-use-short-granules", cl::desc("use short granules in allocas and outlined checks"), cl::Hidden, - cl::init(false), cl::ZeroOrMore); + cl::init(false)); static cl::opt ClInstrumentPersonalityFunctions( "hwasan-instrument-personality-functions", diff --git a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp index 59dde84..6ef478e 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp @@ -68,7 +68,7 @@ static cl::opt DisableMemOPOPT("disable-memop-opt", cl::init(false), // The percent threshold to optimize memory intrinsic calls. static cl::opt MemOPPercentThreshold("pgo-memop-percent-threshold", cl::init(40), - cl::Hidden, cl::ZeroOrMore, + cl::Hidden, cl::desc("The percentage threshold for the " "memory intrinsic calls optimization")); diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp index 84b02a0..35e46ad 100644 --- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp @@ -128,7 +128,7 @@ static cl::opt FusionPeelMaxCount( static cl::opt VerboseFusionDebugging("loop-fusion-verbose-debug", cl::desc("Enable verbose debugging for Loop Fusion"), - cl::Hidden, cl::init(false), cl::ZeroOrMore); + cl::Hidden, cl::init(false)); #endif namespace { diff --git a/llvm/lib/Transforms/Utils/CodeLayout.cpp b/llvm/lib/Transforms/Utils/CodeLayout.cpp index a4ded18..1ff0f14 100644 --- a/llvm/lib/Transforms/Utils/CodeLayout.cpp +++ b/llvm/lib/Transforms/Utils/CodeLayout.cpp @@ -52,7 +52,7 @@ cl::opt EnableExtTspBlockPlacement( cl::opt ApplyExtTspWithoutProfile( "ext-tsp-apply-without-profile", cl::desc("Whether to apply ext-tsp placement for instances w/o profile"), - cl::init(true), cl::Hidden, cl::ZeroOrMore); + cl::init(true), cl::Hidden); // Algorithm-specific constants. The values are tuned for the best performance // of large-scale front-end bound binaries. diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 17dd6df..d05618e 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -213,7 +213,7 @@ static RunPassOption RunPassOpt; static cl::opt> RunPass( "run-pass", cl::desc("Run compiler only for specified passes (comma separated list)"), - cl::value_desc("pass-name"), cl::ZeroOrMore, cl::location(RunPassOpt)); + cl::value_desc("pass-name"), cl::location(RunPassOpt)); static int compileModule(char **, LLVMContext &); diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 720a71e..c78fca9 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -621,7 +621,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { cl::Positional, cl::desc("Covered executable or object file.")); cl::list CovFilenames( - "object", cl::desc("Coverage executable or object file"), cl::ZeroOrMore); + "object", cl::desc("Coverage executable or object file")); cl::opt DebugDumpCollectedObjects( "dump-collected-objects", cl::Optional, cl::Hidden, diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp index ad4d6be..a38736e 100644 --- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp +++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp @@ -46,9 +46,10 @@ static cl::list InputFiles(cl::Positional, cl::ZeroOrMore, cl::cat(LibtoolCategory)); -static cl::opt ArchType( - "arch_only", cl::desc("Specify architecture type for output library"), - cl::value_desc("arch_type"), cl::ZeroOrMore, cl::cat(LibtoolCategory)); +static cl::opt + ArchType("arch_only", + cl::desc("Specify architecture type for output library"), + cl::value_desc("arch_type"), cl::cat(LibtoolCategory)); enum class Operation { None, Static }; diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp index 9a5bc39..ac77e71 100644 --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -71,7 +71,7 @@ static cl::opt OptLevel("O", cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " "(default = '-O2')"), - cl::Prefix, cl::ZeroOrMore, cl::init('2'), cl::cat(LTOCategory)); + cl::Prefix, cl::init('2'), cl::cat(LTOCategory)); static cl::opt IndexStats("thinlto-index-stats", diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp index ca563f2..091bb3a 100644 --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -37,9 +37,10 @@ using namespace lto; static codegen::RegisterCodeGenFlags CGF; static cl::opt - OptLevel("O", cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " - "(default = '-O2')"), - cl::Prefix, cl::ZeroOrMore, cl::init('2')); + OptLevel("O", + cl::desc("Optimization level. [-O0, -O1, -O2, or -O3] " + "(default = '-O2')"), + cl::Prefix, cl::init('2')); static cl::opt CGOptLevel( "cg-opt-level", diff --git a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp index c995c79..474cb19 100644 --- a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp +++ b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp @@ -521,7 +521,7 @@ cl::opt DumpIdExtras("id-extras", cl::desc("dump id hashes and index offsets"), cl::cat(TypeOptions), cl::sub(DumpSubcommand)); cl::list DumpIdIndex( - "id-index", cl::ZeroOrMore, cl::CommaSeparated, + "id-index", cl::CommaSeparated, cl::desc("only dump ids with the specified hexadecimal type index"), cl::cat(TypeOptions), cl::sub(DumpSubcommand)); diff --git a/llvm/tools/llvm-profgen/llvm-profgen.cpp b/llvm/tools/llvm-profgen/llvm-profgen.cpp index 0c60568..c8f8cf5 100644 --- a/llvm/tools/llvm-profgen/llvm-profgen.cpp +++ b/llvm/tools/llvm-profgen/llvm-profgen.cpp @@ -48,11 +48,9 @@ static cl::opt UnsymbolizedProfFilename( static cl::alias UPA("up", cl::desc("Alias for --unsymbolized-profile"), cl::aliasopt(UnsymbolizedProfFilename)); -static cl::opt - SampleProfFilename("llvm-sample-profile", - cl::value_desc("llvm sample profile"), cl::ZeroOrMore, - cl::desc("Path of the LLVM sample profile"), - cl::cat(ProfGenCategory)); +static cl::opt SampleProfFilename( + "llvm-sample-profile", cl::value_desc("llvm sample profile"), + cl::desc("Path of the LLVM sample profile"), cl::cat(ProfGenCategory)); static cl::opt BinaryPath("binary", cl::value_desc("binary"), cl::Required, diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp index d30dbc8..dc6ed169 100644 --- a/polly/lib/Analysis/DependenceInfo.cpp +++ b/polly/lib/Analysis/DependenceInfo.cpp @@ -45,17 +45,17 @@ static cl::opt OptComputeOut( "polly-dependences-computeout", cl::desc("Bound the dependence analysis by a maximal amount of " "computational steps (0 means no bound)"), - cl::Hidden, cl::init(500000), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(500000), cl::cat(PollyCategory)); -static cl::opt LegalityCheckDisabled( - "disable-polly-legality", cl::desc("Disable polly legality check"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); +static cl::opt + LegalityCheckDisabled("disable-polly-legality", + cl::desc("Disable polly legality check"), cl::Hidden, + cl::cat(PollyCategory)); static cl::opt UseReductions("polly-dependences-use-reductions", cl::desc("Exploit reductions in dependence analysis"), - cl::Hidden, cl::init(true), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::init(true), cl::cat(PollyCategory)); enum AnalysisType { VALUE_BASED_ANALYSIS, MEMORY_BASED_ANALYSIS }; diff --git a/polly/lib/Analysis/PolyhedralInfo.cpp b/polly/lib/Analysis/PolyhedralInfo.cpp index dff67e8..1350944 100644 --- a/polly/lib/Analysis/PolyhedralInfo.cpp +++ b/polly/lib/Analysis/PolyhedralInfo.cpp @@ -36,8 +36,7 @@ using namespace polly; static cl::opt CheckParallel("polly-check-parallel", cl::desc("Check for parallel loops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt CheckVectorizable("polly-check-vectorizable", cl::desc("Check for vectorizable loops"), diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp index 6a5b6bd..8189965 100644 --- a/polly/lib/Analysis/ScopBuilder.cpp +++ b/polly/lib/Analysis/ScopBuilder.cpp @@ -78,15 +78,14 @@ static unsigned const MaxDimensionsInAccessRange = 9; static cl::opt XModelReadOnlyScalars( "polly-analyze-read-only-scalars", cl::desc("Model read-only scalar values in the scop description"), - cl::location(ModelReadOnlyScalars), cl::Hidden, cl::ZeroOrMore, - cl::init(true), cl::cat(PollyCategory)); + cl::location(ModelReadOnlyScalars), cl::Hidden, cl::init(true), + cl::cat(PollyCategory)); static cl::opt OptComputeOut("polly-analysis-computeout", cl::desc("Bound the scop analysis by a maximal amount of " "computational steps (0 means no bound)"), - cl::Hidden, cl::init(800000), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::init(800000), cl::cat(PollyCategory)); static cl::opt PollyAllowDereferenceOfAllFunctionParams( "polly-allow-dereference-of-all-function-parameters", @@ -106,13 +105,13 @@ static cl::opt static cl::opt RunTimeChecksMaxArraysPerGroup( "polly-rtc-max-arrays-per-group", cl::desc("The maximal number of arrays to compare in each alias group."), - cl::Hidden, cl::ZeroOrMore, cl::init(20), cl::cat(PollyCategory)); + cl::Hidden, cl::init(20), cl::cat(PollyCategory)); static cl::opt RunTimeChecksMaxAccessDisjuncts( "polly-rtc-max-array-disjuncts", cl::desc("The maximal number of disjunts allowed in memory accesses to " "to build RTCs."), - cl::Hidden, cl::ZeroOrMore, cl::init(8), cl::cat(PollyCategory)); + cl::Hidden, cl::init(8), cl::cat(PollyCategory)); static cl::opt RunTimeChecksMaxParameters( "polly-rtc-max-parameters", @@ -131,16 +130,16 @@ static cl::opt UserContextStr( static cl::opt DetectReductions("polly-detect-reductions", cl::desc("Detect and exploit reductions"), - cl::Hidden, cl::ZeroOrMore, - cl::init(true), cl::cat(PollyCategory)); + cl::Hidden, cl::init(true), + cl::cat(PollyCategory)); // Multiplicative reductions can be disabled separately as these kind of // operations can overflow easily. Additive reductions and bit operations // are in contrast pretty stable. static cl::opt DisableMultiplicativeReductions( "polly-disable-multiplicative-reductions", - cl::desc("Disable multiplicative reductions"), cl::Hidden, cl::ZeroOrMore, - cl::init(false), cl::cat(PollyCategory)); + cl::desc("Disable multiplicative reductions"), cl::Hidden, + cl::cat(PollyCategory)); enum class GranularityChoice { BasicBlocks, ScalarIndependence, Stores }; diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 12e92fe..f9c39c1 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -109,8 +109,7 @@ static cl::opt XPollyProcessUnprofitable( "polly-process-unprofitable", cl::desc( "Process scops that are unlikely to benefit from Polly optimizations."), - cl::location(PollyProcessUnprofitable), cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::location(PollyProcessUnprofitable), cl::cat(PollyCategory)); static cl::list OnlyFunctions( "polly-only-func", @@ -146,68 +145,63 @@ static cl::opt OnlyRegion( static cl::opt IgnoreAliasing("polly-ignore-aliasing", cl::desc("Ignore possible aliasing of the array bases"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); bool polly::PollyAllowUnsignedOperations; static cl::opt XPollyAllowUnsignedOperations( "polly-allow-unsigned-operations", cl::desc("Allow unsigned operations such as comparisons or zero-extends."), - cl::location(PollyAllowUnsignedOperations), cl::Hidden, cl::ZeroOrMore, - cl::init(true), cl::cat(PollyCategory)); + cl::location(PollyAllowUnsignedOperations), cl::Hidden, cl::init(true), + cl::cat(PollyCategory)); bool polly::PollyUseRuntimeAliasChecks; static cl::opt XPollyUseRuntimeAliasChecks( "polly-use-runtime-alias-checks", cl::desc("Use runtime alias checks to resolve possible aliasing."), - cl::location(PollyUseRuntimeAliasChecks), cl::Hidden, cl::ZeroOrMore, - cl::init(true), cl::cat(PollyCategory)); + cl::location(PollyUseRuntimeAliasChecks), cl::Hidden, cl::init(true), + cl::cat(PollyCategory)); static cl::opt ReportLevel("polly-report", cl::desc("Print information about the activities of Polly"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); static cl::opt AllowDifferentTypes( "polly-allow-differing-element-types", cl::desc("Allow different element types for array accesses"), cl::Hidden, - cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt AllowNonAffine("polly-allow-nonaffine", cl::desc("Allow non affine access functions in arrays"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt AllowModrefCall("polly-allow-modref-calls", cl::desc("Allow functions with known modref behavior"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt AllowNonAffineSubRegions( "polly-allow-nonaffine-branches", cl::desc("Allow non affine conditions for branches"), cl::Hidden, - cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt AllowNonAffineSubLoops("polly-allow-nonaffine-loops", cl::desc("Allow non affine conditions for loops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt TrackFailures("polly-detect-track-failures", cl::desc("Track failure strings in detecting scop regions"), - cl::location(PollyTrackFailures), cl::Hidden, cl::ZeroOrMore, - cl::init(true), cl::cat(PollyCategory)); + cl::location(PollyTrackFailures), cl::Hidden, cl::init(true), + cl::cat(PollyCategory)); static cl::opt KeepGoing("polly-detect-keep-going", cl::desc("Do not fail on the first error."), - cl::Hidden, cl::ZeroOrMore, cl::init(false), - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt PollyDelinearizeX("polly-delinearize", @@ -218,20 +212,20 @@ static cl::opt static cl::opt VerifyScops("polly-detect-verify", cl::desc("Verify the detected SCoPs after each transformation"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); bool polly::PollyInvariantLoadHoisting; -static cl::opt XPollyInvariantLoadHoisting( - "polly-invariant-load-hoisting", cl::desc("Hoist invariant loads."), - cl::location(PollyInvariantLoadHoisting), cl::Hidden, cl::ZeroOrMore, - cl::init(false), cl::cat(PollyCategory)); +static cl::opt + XPollyInvariantLoadHoisting("polly-invariant-load-hoisting", + cl::desc("Hoist invariant loads."), + cl::location(PollyInvariantLoadHoisting), + cl::Hidden, cl::cat(PollyCategory)); static cl::opt PollyAllowErrorBlocks( "polly-allow-error-blocks", cl::desc("Allow to speculate on the execution of 'error blocks'."), - cl::Hidden, cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(true), cl::cat(PollyCategory)); /// The minimal trip count under which loops are considered unprofitable. static const unsigned MIN_LOOP_TRIP_COUNT = 8; diff --git a/polly/lib/Analysis/ScopGraphPrinter.cpp b/polly/lib/Analysis/ScopGraphPrinter.cpp index 0f37c96..eb6c995 100644 --- a/polly/lib/Analysis/ScopGraphPrinter.cpp +++ b/polly/lib/Analysis/ScopGraphPrinter.cpp @@ -23,11 +23,11 @@ using namespace llvm; static cl::opt ViewFilter("polly-view-only", cl::desc("Only view functions that match this pattern"), - cl::Hidden, cl::init(""), cl::ZeroOrMore); + cl::Hidden, cl::init("")); static cl::opt ViewAll("polly-view-all", cl::desc("Also show functions without any scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore); + cl::Hidden, cl::init(false)); namespace llvm { diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index e709655..19c2c6f 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -126,7 +126,7 @@ static int const MaxDisjunktsInDefinedBehaviourContext = 8; static cl::opt PollyRemarksMinimal( "polly-remarks-minimal", cl::desc("Do not emit remarks about assumptions that are known"), - cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt IslOnErrorAbort("polly-on-isl-error-abort", diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 718e311..2f7d7a9 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -33,8 +33,7 @@ using namespace polly; static cl::opt Aligned("enable-polly-aligned", cl::desc("Assumed aligned memory accesses."), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); bool PollyDebugPrinting; static cl::opt DebugPrintingX( @@ -46,13 +45,13 @@ static cl::opt DebugPrintingX( static cl::opt TraceStmts( "polly-codegen-trace-stmts", cl::desc("Add printf calls that print the statement being executed"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt TraceScalars( "polly-codegen-trace-scalars", cl::desc("Add printf calls that print the values of all scalar values " "used in a statement. Requires -polly-codegen-trace-stmts."), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); BlockGenerator::BlockGenerator( PollyIRBuilder &B, LoopInfo &LI, ScalarEvolution &SE, DominatorTree &DT, diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 97d6737..f3e8068 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -51,8 +51,7 @@ using namespace polly; static cl::opt Verify("polly-codegen-verify", cl::desc("Verify the function generated by Polly"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); bool polly::PerfMonitoring; diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 98e9638..338be5b 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -62,11 +62,10 @@ using IslAstUserPayload = IslAstInfo::IslAstUserPayload; static cl::opt PollyParallel("polly-parallel", cl::desc("Generate thread parallel code (isl codegen only)"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); static cl::opt PrintAccesses("polly-ast-print-accesses", cl::desc("Print memory access functions"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); static cl::opt PollyParallelForce( @@ -77,12 +76,10 @@ static cl::opt PollyParallelForce( static cl::opt UseContext("polly-ast-use-context", cl::desc("Use context"), cl::Hidden, - cl::init(true), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt DetectParallel("polly-ast-detect-parallel", cl::desc("Detect parallelism"), cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); STATISTIC(ScopsProcessed, "Number of SCoPs processed"); diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 568239c..843fa0e 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -86,7 +86,7 @@ enum class OpenMPBackend { GNU, LLVM }; static cl::opt PollyGenerateRTCPrint( "polly-codegen-emit-rtc-print", cl::desc("Emit code that prints the runtime check result dynamically."), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); // If this option is set we always use the isl AST generator to regenerate // memory accesses. Without this option set we regenerate expressions using the @@ -95,12 +95,12 @@ static cl::opt PollyGenerateRTCPrint( static cl::opt PollyGenerateExpressions( "polly-codegen-generate-expressions", cl::desc("Generate AST expressions for unmodified and modified accesses"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt PollyTargetFirstLevelCacheLineSize( "polly-target-first-level-cache-line-size", cl::desc("The size of the first level cache line size specified in bytes."), - cl::Hidden, cl::init(64), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(64), cl::cat(PollyCategory)); static cl::opt PollyOmpBackend( "polly-omp-backend", cl::desc("Choose the OpenMP library to use:"), diff --git a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp index 1b63da7..a397692 100644 --- a/polly/lib/CodeGen/ManagedMemoryRewrite.cpp +++ b/polly/lib/CodeGen/ManagedMemoryRewrite.cpp @@ -33,7 +33,7 @@ static cl::opt RewriteAllocas( "polly-acc-rewrite-allocas", cl::desc( "Ask the managed memory rewriter to also rewrite alloca instructions"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt IgnoreLinkageForGlobals( "polly-acc-rewrite-ignore-linkage-for-globals", diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 2b6ae85..1f79c19 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -55,35 +55,29 @@ using namespace llvm; static cl::opt DumpSchedule("polly-acc-dump-schedule", cl::desc("Dump the computed GPU Schedule"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt DumpCode("polly-acc-dump-code", cl::desc("Dump C code describing the GPU mapping"), cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); static cl::opt DumpKernelIR("polly-acc-dump-kernel-ir", cl::desc("Dump the kernel LLVM-IR"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt DumpKernelASM("polly-acc-dump-kernel-asm", cl::desc("Dump the kernel assembly code"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt FastMath("polly-acc-fastmath", cl::desc("Allow unsafe math optimizations"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt SharedMemory("polly-acc-use-shared", cl::desc("Use shared memory"), cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); static cl::opt PrivateMemory("polly-acc-use-private", cl::desc("Use private memory"), cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); bool polly::PollyManagedMemory; @@ -111,7 +105,7 @@ static cl::opt CUDALibDevice( static cl::opt CudaVersion("polly-acc-cuda-version", cl::desc("The CUDA version to compile for"), cl::Hidden, - cl::init("sm_30"), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init("sm_30"), cl::cat(PollyCategory)); static cl::opt MinCompute("polly-acc-mincompute", diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp index 573393b..0210341 100644 --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -65,12 +65,12 @@ namespace polly { static cl::opt PollyEnabled("polly", cl::desc("Enable the polly optimizer (with -O1, -O2 or -O3)"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); static cl::opt PollyDetectOnly( "polly-only-scop-detection", cl::desc("Only run scop detection, but no other optimizations"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); enum PassPositionChoice { POSITION_EARLY, @@ -136,22 +136,21 @@ static cl::opt Vectorizer( static cl::opt ImportJScop( "polly-import", cl::desc("Import the polyhedral description of the detected Scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt FullyIndexedStaticExpansion( "polly-enable-mse", cl::desc("Fully expand the memory accesses of the detected Scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt ExportJScop( "polly-export", cl::desc("Export the polyhedral description of the detected Scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt DeadCodeElim("polly-run-dce", cl::desc("Run the dead code elimination"), - cl::Hidden, cl::init(false), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); static cl::opt PollyViewer( "polly-show", diff --git a/polly/lib/Support/SCEVAffinator.cpp b/polly/lib/Support/SCEVAffinator.cpp index b317702..d1998d1 100644 --- a/polly/lib/Support/SCEVAffinator.cpp +++ b/polly/lib/Support/SCEVAffinator.cpp @@ -27,7 +27,7 @@ static cl::opt IgnoreIntegerWrapping( "polly-ignore-integer-wrapping", cl::desc("Do not build run-time checks to proof absence of integer " "wrapping"), - cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::cat(PollyCategory)); + cl::Hidden, cl::cat(PollyCategory)); // The maximal number of basic sets we allow during the construction of a // piecewise affine function. More complex ones will result in very high diff --git a/polly/lib/Transform/Canonicalization.cpp b/polly/lib/Transform/Canonicalization.cpp index d55bbe2..edb8e5e 100644 --- a/polly/lib/Transform/Canonicalization.cpp +++ b/polly/lib/Transform/Canonicalization.cpp @@ -37,7 +37,7 @@ using namespace polly; static cl::opt PollyInliner("polly-run-inliner", cl::desc("Run an early inliner pass before Polly"), cl::Hidden, - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); void polly::registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM) { bool UseMemSSA = true; diff --git a/polly/lib/Transform/ManualOptimizer.cpp b/polly/lib/Transform/ManualOptimizer.cpp index c3f040a..42083f6 100644 --- a/polly/lib/Transform/ManualOptimizer.cpp +++ b/polly/lib/Transform/ManualOptimizer.cpp @@ -32,7 +32,7 @@ namespace { static cl::opt IgnoreDepcheck( "polly-pragma-ignore-depcheck", cl::desc("Skip the dependency check for pragma-based transformations"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); /// Same as llvm::hasUnrollTransformation(), but takes a LoopID as argument /// instead of a Loop. diff --git a/polly/lib/Transform/MatmulOptimizer.cpp b/polly/lib/Transform/MatmulOptimizer.cpp index 38636b7..84c7da6 100644 --- a/polly/lib/Transform/MatmulOptimizer.cpp +++ b/polly/lib/Transform/MatmulOptimizer.cpp @@ -66,24 +66,24 @@ static cl::opt ThroughputVectorFma( static cl::opt FirstCacheLevelSize( "polly-target-1st-cache-level-size", cl::desc("The size of the first cache level specified in bytes."), - cl::Hidden, cl::init(-1), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(-1), cl::cat(PollyCategory)); static cl::opt FirstCacheLevelDefaultSize( "polly-target-1st-cache-level-default-size", cl::desc("The default size of the first cache level specified in bytes" " (if not enough were provided by the TargetTransformInfo)."), - cl::Hidden, cl::init(32768), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(32768), cl::cat(PollyCategory)); static cl::opt SecondCacheLevelSize( "polly-target-2nd-cache-level-size", cl::desc("The size of the second level specified in bytes."), cl::Hidden, - cl::init(-1), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(-1), cl::cat(PollyCategory)); static cl::opt SecondCacheLevelDefaultSize( "polly-target-2nd-cache-level-default-size", cl::desc("The default size of the second cache level specified in bytes" " (if not enough were provided by the TargetTransformInfo)."), - cl::Hidden, cl::init(262144), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(262144), cl::cat(PollyCategory)); // This option, along with --polly-target-2nd-cache-level-associativity, // --polly-target-1st-cache-level-size, and --polly-target-2st-cache-level-size @@ -95,36 +95,36 @@ static cl::opt SecondCacheLevelDefaultSize( static cl::opt FirstCacheLevelAssociativity( "polly-target-1st-cache-level-associativity", cl::desc("The associativity of the first cache level."), cl::Hidden, - cl::init(-1), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(-1), cl::cat(PollyCategory)); static cl::opt FirstCacheLevelDefaultAssociativity( "polly-target-1st-cache-level-default-associativity", cl::desc("The default associativity of the first cache level" " (if not enough were provided by the TargetTransformInfo)."), - cl::Hidden, cl::init(8), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(8), cl::cat(PollyCategory)); static cl::opt SecondCacheLevelAssociativity( "polly-target-2nd-cache-level-associativity", cl::desc("The associativity of the second cache level."), cl::Hidden, - cl::init(-1), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(-1), cl::cat(PollyCategory)); static cl::opt SecondCacheLevelDefaultAssociativity( "polly-target-2nd-cache-level-default-associativity", cl::desc("The default associativity of the second cache level" " (if not enough were provided by the TargetTransformInfo)."), - cl::Hidden, cl::init(8), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(8), cl::cat(PollyCategory)); static cl::opt VectorRegisterBitwidth( "polly-target-vector-register-bitwidth", cl::desc("The size in bits of a vector register (if not set, this " "information is taken from LLVM's target information."), - cl::Hidden, cl::init(-1), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(-1), cl::cat(PollyCategory)); static cl::opt PollyPatternMatchingNcQuotient( "polly-pattern-matching-nc-quotient", cl::desc("Quotient that is obtained by dividing Nc, the parameter of the" "macro-kernel, by Nr, the parameter of the micro-kernel"), - cl::Hidden, cl::init(256), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(256), cl::cat(PollyCategory)); namespace { /// Parameters of the micro kernel. diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp index 34d95ea..0de88c2 100644 --- a/polly/lib/Transform/ScheduleOptimizer.cpp +++ b/polly/lib/Transform/ScheduleOptimizer.cpp @@ -74,29 +74,27 @@ class Module; static cl::opt OptimizeDeps("polly-opt-optimize-only", cl::desc("Only a certain kind of dependences (all/raw)"), - cl::Hidden, cl::init("all"), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::init("all"), cl::cat(PollyCategory)); static cl::opt SimplifyDeps("polly-opt-simplify-deps", cl::desc("Dependences should be simplified (yes/no)"), - cl::Hidden, cl::init("yes"), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::Hidden, cl::init("yes"), cl::cat(PollyCategory)); static cl::opt MaxConstantTerm( "polly-opt-max-constant-term", cl::desc("The maximal constant term allowed (-1 is unlimited)"), cl::Hidden, - cl::init(20), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(20), cl::cat(PollyCategory)); static cl::opt MaxCoefficient( "polly-opt-max-coefficient", cl::desc("The maximal coefficient allowed (-1 is unlimited)"), cl::Hidden, - cl::init(20), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(20), cl::cat(PollyCategory)); static cl::opt MaximizeBandDepth("polly-opt-maximize-bands", cl::desc("Maximize the band depth (yes/no)"), cl::Hidden, - cl::init("yes"), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init("yes"), cl::cat(PollyCategory)); static cl::opt GreedyFusion("polly-loopfusion-greedy", @@ -107,18 +105,17 @@ static cl::opt OuterCoincidence( "polly-opt-outer-coincidence", cl::desc("Try to construct schedules where the outer member of each band " "satisfies the coincidence constraints (yes/no)"), - cl::Hidden, cl::init("no"), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init("no"), cl::cat(PollyCategory)); static cl::opt PrevectorWidth( "polly-prevect-width", cl::desc( "The number of loop iterations to strip-mine for pre-vectorization"), - cl::Hidden, cl::init(4), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(4), cl::cat(PollyCategory)); static cl::opt FirstLevelTiling("polly-tiling", cl::desc("Enable loop tiling"), - cl::init(true), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt FirstLevelDefaultTileSize( "polly-default-tile-size", @@ -136,13 +133,13 @@ static cl::list static cl::opt SecondLevelTiling("polly-2nd-level-tiling", cl::desc("Enable a 2nd level loop of loop tiling"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::cat(PollyCategory)); static cl::opt SecondLevelDefaultTileSize( "polly-2nd-level-default-tile-size", cl::desc("The default 2nd-level tile size (if not enough were provided by" " --polly-2nd-level-tile-sizes)"), - cl::Hidden, cl::init(16), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(16), cl::cat(PollyCategory)); static cl::list SecondLevelTileSizes("polly-2nd-level-tile-sizes", @@ -153,7 +150,6 @@ static cl::list static cl::opt RegisterTiling("polly-register-tiling", cl::desc("Enable register tiling"), - cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); static cl::opt RegisterDefaultTileSize( @@ -172,23 +168,22 @@ static cl::list static cl::opt PragmaBasedOpts( "polly-pragma-based-opts", cl::desc("Apply user-directed transformation from metadata"), - cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt EnableReschedule("polly-reschedule", cl::desc("Optimize SCoPs using ISL"), - cl::init(true), cl::ZeroOrMore, - cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt PMBasedOpts("polly-pattern-matching-based-opts", cl::desc("Perform optimizations based on pattern matching"), - cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt EnablePostopts("polly-postopts", cl::desc("Apply post-rescheduling optimizations such as " "tiling (requires -polly-reschedule)"), - cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::init(true), cl::cat(PollyCategory)); static cl::opt OptimizedScops( "polly-optimized-scops",