diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index dd894154dbf2..f5fc26da95d3 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -47,12 +47,9 @@ using namespace llvm; namespace opts { -cl::opt -NoHugePages("no-huge-pages", - cl::desc("use regular size pages for code alignment"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +cl::opt NoHugePages("no-huge-pages", + cl::desc("use regular size pages for code alignment"), + cl::Hidden, cl::cat(BoltCategory)); static cl::opt PrintDebugInfo("print-debug-info", @@ -61,12 +58,10 @@ PrintDebugInfo("print-debug-info", cl::ZeroOrMore, cl::cat(BoltCategory)); -cl::opt -PrintRelocations("print-relocations", - cl::desc("print relocations when printing functions/objects"), - cl::Hidden, - cl::ZeroOrMore, - cl::cat(BoltCategory)); +cl::opt PrintRelocations( + "print-relocations", + cl::desc("print relocations when printing functions/objects"), cl::Hidden, + cl::cat(BoltCategory)); static cl::opt PrintMemData("print-mem-data", diff --git a/bolt/lib/Core/BinaryData.cpp b/bolt/lib/Core/BinaryData.cpp index d8f59573af67..f963406c17d5 100644 --- a/bolt/lib/Core/BinaryData.cpp +++ b/bolt/lib/Core/BinaryData.cpp @@ -25,11 +25,9 @@ extern cl::OptionCategory BoltCategory; extern cl::opt Verbosity; cl::opt -PrintSymbolAliases("print-aliases", - cl::desc("print aliases when printing objects"), - cl::Hidden, - cl::ZeroOrMore, - cl::cat(BoltCategory)); + PrintSymbolAliases("print-aliases", + cl::desc("print aliases when printing objects"), + cl::Hidden, cl::cat(BoltCategory)); } bool BinaryData::isAbsolute() const { return Flags & SymbolRef::SF_Absolute; } diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp index e7f900b44f2b..8fde5cf3131f 100644 --- a/bolt/lib/Core/BinaryEmitter.cpp +++ b/bolt/lib/Core/BinaryEmitter.cpp @@ -34,12 +34,8 @@ namespace opts { extern cl::opt JumpTables; extern cl::opt PreserveBlocksAlignment; -cl::opt -AlignBlocks("align-blocks", - cl::desc("align basic blocks"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt AlignBlocks("align-blocks", cl::desc("align basic blocks"), + cl::cat(BoltOptCategory)); cl::opt AlignMacroOpFusion("align-macro-fusion", @@ -70,20 +66,15 @@ FunctionPadSpec("pad-funcs", cl::Hidden, cl::cat(BoltCategory)); -static cl::opt -MarkFuncs("mark-funcs", - cl::desc("mark function boundaries with break instruction to make " - "sure we accidentally don't cross them"), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltCategory)); +static cl::opt MarkFuncs( + "mark-funcs", + cl::desc("mark function boundaries with break instruction to make " + "sure we accidentally don't cross them"), + cl::ReallyHidden, cl::cat(BoltCategory)); -static cl::opt -PrintJumpTables("print-jump-tables", - cl::desc("print jump tables"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt PrintJumpTables("print-jump-tables", + cl::desc("print jump tables"), cl::Hidden, + cl::cat(BoltCategory)); static cl::opt X86AlignBranchBoundaryHotOnly("x86-align-branch-boundary-hot-only", diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index 671836c5cb44..6784763c71b1 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -64,23 +64,18 @@ extern cl::opt Verbosity; extern bool processAllFunctions(); -cl::opt -CheckEncoding("check-encoding", - cl::desc("perform verification of LLVM instruction encoding/decoding. " - "Every instruction in the input is decoded and re-encoded. " - "If the resulting bytes do not match the input, a warning message " - "is printed."), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +cl::opt CheckEncoding( + "check-encoding", + cl::desc("perform verification of LLVM instruction encoding/decoding. " + "Every instruction in the input is decoded and re-encoded. " + "If the resulting bytes do not match the input, a warning message " + "is printed."), + cl::Hidden, cl::cat(BoltCategory)); -static cl::opt -DotToolTipCode("dot-tooltip-code", - cl::desc("add basic block instructions as tool tips on nodes"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt DotToolTipCode( + "dot-tooltip-code", + cl::desc("add basic block instructions as tool tips on nodes"), cl::Hidden, + cl::cat(BoltCategory)); cl::opt JumpTables("jump-tables", @@ -102,21 +97,17 @@ JumpTables("jump-tables", cl::ZeroOrMore, cl::cat(BoltOptCategory)); -static cl::opt -NoScan("no-scan", - cl::desc("do not scan cold functions for external references (may result in " - "slower binary)"), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt NoScan( + "no-scan", + cl::desc( + "do not scan cold functions for external references (may result in " + "slower binary)"), + cl::Hidden, cl::cat(BoltOptCategory)); cl::opt -PreserveBlocksAlignment("preserve-blocks-alignment", - cl::desc("try to preserve basic block alignment"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + PreserveBlocksAlignment("preserve-blocks-alignment", + cl::desc("try to preserve basic block alignment"), + cl::cat(BoltOptCategory)); cl::opt PrintDynoStats("dyno-stats", @@ -139,11 +130,9 @@ PrintOnly("print-only", cl::cat(BoltCategory)); cl::opt -TimeBuild("time-build", - cl::desc("print time spent constructing binary functions"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + TimeBuild("time-build", + cl::desc("print time spent constructing binary functions"), + cl::Hidden, cl::cat(BoltCategory)); cl::opt TrapOnAVX512("trap-avx512", diff --git a/bolt/lib/Core/BinaryFunctionProfile.cpp b/bolt/lib/Core/BinaryFunctionProfile.cpp index c6dc87b68f0f..a8d36a93ce52 100644 --- a/bolt/lib/Core/BinaryFunctionProfile.cpp +++ b/bolt/lib/Core/BinaryFunctionProfile.cpp @@ -40,29 +40,20 @@ cl::opt ICP( extern cl::opt JumpTables; -static cl::opt -FixFuncCounts("fix-func-counts", - cl::desc("adjust function counts based on basic blocks execution count"), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt FixFuncCounts( + "fix-func-counts", + cl::desc("adjust function counts based on basic blocks execution count"), + cl::Hidden, cl::cat(BoltOptCategory)); + +static cl::opt FixBlockCounts( + "fix-block-counts", + cl::desc("adjust block counts based on outgoing branch counts"), + cl::init(true), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -FixBlockCounts("fix-block-counts", - cl::desc("adjust block counts based on outgoing branch counts"), - cl::init(true), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); - -static cl::opt -InferFallThroughs("infer-fall-throughs", - cl::desc("infer execution count for fall-through blocks"), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + InferFallThroughs("infer-fall-throughs", + cl::desc("infer execution count for fall-through blocks"), + cl::Hidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Core/Exceptions.cpp b/bolt/lib/Core/Exceptions.cpp index 70e41077a53f..f5217de50715 100644 --- a/bolt/lib/Core/Exceptions.cpp +++ b/bolt/lib/Core/Exceptions.cpp @@ -39,11 +39,9 @@ extern llvm::cl::OptionCategory BoltCategory; extern llvm::cl::opt Verbosity; static llvm::cl::opt -PrintExceptions("print-exceptions", - llvm::cl::desc("print exception handling data"), - llvm::cl::ZeroOrMore, - llvm::cl::Hidden, - llvm::cl::cat(BoltCategory)); + PrintExceptions("print-exceptions", + llvm::cl::desc("print exception handling data"), + llvm::cl::Hidden, llvm::cl::cat(BoltCategory)); } // namespace opts diff --git a/bolt/lib/Passes/Aligner.cpp b/bolt/lib/Passes/Aligner.cpp index 89e787737866..9f2a6db39755 100644 --- a/bolt/lib/Passes/Aligner.cpp +++ b/bolt/lib/Passes/Aligner.cpp @@ -33,23 +33,19 @@ AlignBlocksMinSize("align-blocks-min-size", cl::Hidden, cl::cat(BoltOptCategory)); -cl::opt -AlignBlocksThreshold("align-blocks-threshold", - cl::desc("align only blocks with frequency larger than containing function " - "execution frequency specified in percent. E.g. 1000 means aligning " - "blocks that are 10 times more frequently executed than the " - "containing function."), - cl::init(800), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +cl::opt AlignBlocksThreshold( + "align-blocks-threshold", + cl::desc( + "align only blocks with frequency larger than containing function " + "execution frequency specified in percent. E.g. 1000 means aligning " + "blocks that are 10 times more frequently executed than the " + "containing function."), + cl::init(800), cl::Hidden, cl::cat(BoltOptCategory)); -cl::opt -AlignFunctionsMaxBytes("align-functions-max-bytes", - cl::desc("maximum number of bytes to use to align functions"), - cl::init(32), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt AlignFunctionsMaxBytes( + "align-functions-max-bytes", + cl::desc("maximum number of bytes to use to align functions"), cl::init(32), + cl::cat(BoltOptCategory)); cl::opt BlockAlignment("block-alignment", @@ -59,11 +55,9 @@ BlockAlignment("block-alignment", cl::cat(BoltOptCategory)); cl::opt -UseCompactAligner("use-compact-aligner", - cl::desc("Use compact approach for aligning functions"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + UseCompactAligner("use-compact-aligner", + cl::desc("Use compact approach for aligning functions"), + cl::init(true), cl::cat(BoltOptCategory)); } // end namespace opts diff --git a/bolt/lib/Passes/AsmDump.cpp b/bolt/lib/Passes/AsmDump.cpp index b89b46319289..fda787cb2f41 100644 --- a/bolt/lib/Passes/AsmDump.cpp +++ b/bolt/lib/Passes/AsmDump.cpp @@ -30,7 +30,7 @@ extern cl::opt Verbosity; cl::opt AsmDump("asm-dump", cl::desc("dump function into assembly"), cl::value_desc("dump folder"), cl::ValueOptional, - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); + cl::Hidden, cl::cat(BoltCategory)); } // end namespace opts namespace llvm { diff --git a/bolt/lib/Passes/BinaryPasses.cpp b/bolt/lib/Passes/BinaryPasses.cpp index 7c44f37cc89f..b2b4ce50596b 100644 --- a/bolt/lib/Passes/BinaryPasses.cpp +++ b/bolt/lib/Passes/BinaryPasses.cpp @@ -69,13 +69,11 @@ enum DynoStatsSortOrder : char { Descending }; -static cl::opt -DynoStatsSortOrderOpt("print-sorted-by-order", - cl::desc("use ascending or descending order when printing functions " - "ordered by dyno stats"), - cl::ZeroOrMore, - cl::init(DynoStatsSortOrder::Descending), - cl::cat(BoltOptCategory)); +static cl::opt DynoStatsSortOrderOpt( + "print-sorted-by-order", + cl::desc("use ascending or descending order when printing functions " + "ordered by dyno stats"), + cl::init(DynoStatsSortOrder::Descending), cl::cat(BoltOptCategory)); cl::list HotTextMoveSections("hot-text-move-sections", @@ -97,13 +95,11 @@ bool isHotTextMover(const BinaryFunction &Function) { return false; } -static cl::opt -MinBranchClusters("min-branch-clusters", - cl::desc("use a modified clustering algorithm geared towards minimizing " - "branches"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt MinBranchClusters( + "min-branch-clusters", + cl::desc("use a modified clustering algorithm geared towards minimizing " + "branches"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::list Peepholes( "peepholes", cl::CommaSeparated, cl::desc("enable peephole optimizations"), @@ -120,11 +116,9 @@ static cl::list Peepholes( cl::ZeroOrMore, cl::cat(BoltOptCategory)); static cl::opt -PrintFuncStat("print-function-statistics", - cl::desc("print statistics about basic block ordering"), - cl::init(0), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + PrintFuncStat("print-function-statistics", + cl::desc("print statistics about basic block ordering"), + cl::init(0), cl::cat(BoltOptCategory)); static cl::list PrintSortedBy("print-sorted-by", @@ -144,20 +138,14 @@ PrintSortedBy("print-sorted-by", cl::cat(BoltOptCategory)); static cl::opt -PrintUnknown("print-unknown", - cl::desc("print names of functions with unknown control flow"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltCategory), - cl::Hidden); + PrintUnknown("print-unknown", + cl::desc("print names of functions with unknown control flow"), + cl::cat(BoltCategory), cl::Hidden); static cl::opt -PrintUnknownCFG("print-unknown-cfg", - cl::desc("dump CFG of functions with unknown control flow"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltCategory), - cl::ReallyHidden); + PrintUnknownCFG("print-unknown-cfg", + cl::desc("dump CFG of functions with unknown control flow"), + cl::cat(BoltCategory), cl::ReallyHidden); cl::opt ReorderBlocks( "reorder-blocks", cl::desc("change layout of basic blocks in a function"), @@ -192,21 +180,15 @@ cl::opt ReorderBlocks( } })); -static cl::opt -ReportBadLayout("report-bad-layout", - cl::desc("print top functions with suboptimal code layout on input"), - cl::init(0), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt ReportBadLayout( + "report-bad-layout", + cl::desc("print top functions with suboptimal code layout on input"), + cl::init(0), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -ReportStaleFuncs("report-stale", - cl::desc("print the list of functions with stale profile"), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + ReportStaleFuncs("report-stale", + cl::desc("print the list of functions with stale profile"), + cl::Hidden, cl::cat(BoltOptCategory)); enum SctcModes : char { SctcAlways, @@ -237,23 +219,18 @@ StaleThreshold("stale-threshold", cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -TSPThreshold("tsp-threshold", - cl::desc("maximum number of hot basic blocks in a function for which to use " - "a precise TSP solution while re-ordering basic blocks"), - cl::init(10), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt TSPThreshold( + "tsp-threshold", + cl::desc( + "maximum number of hot basic blocks in a function for which to use " + "a precise TSP solution while re-ordering basic blocks"), + cl::init(10), cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -TopCalledLimit("top-called-limit", - cl::desc("maximum number of functions to print in top called " - "functions section"), - cl::init(100), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt TopCalledLimit( + "top-called-limit", + cl::desc("maximum number of functions to print in top called " + "functions section"), + cl::init(100), cl::Hidden, cl::cat(BoltCategory)); } // namespace opts diff --git a/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp b/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp index eed1aaa8ef8d..e20f97935cfa 100644 --- a/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp +++ b/bolt/lib/Passes/ExtTSPReorderAlgorithm.cpp @@ -45,46 +45,32 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; extern cl::opt NoThreads; -cl::opt -ChainSplitThreshold("chain-split-threshold", - cl::desc("The maximum size of a chain to apply splitting"), - cl::init(128), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt ChainSplitThreshold( + "chain-split-threshold", + cl::desc("The maximum size of a chain to apply splitting"), cl::init(128), + cl::ReallyHidden, cl::cat(BoltOptCategory)); cl::opt -ForwardWeight("forward-weight", - cl::desc("The weight of forward jumps for ExtTSP value"), - cl::init(0.1), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + ForwardWeight("forward-weight", + cl::desc("The weight of forward jumps for ExtTSP value"), + cl::init(0.1), cl::ReallyHidden, cl::cat(BoltOptCategory)); cl::opt -BackwardWeight("backward-weight", - cl::desc("The weight of backward jumps for ExtTSP value"), - cl::init(0.1), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + BackwardWeight("backward-weight", + cl::desc("The weight of backward jumps for ExtTSP value"), + cl::init(0.1), cl::ReallyHidden, cl::cat(BoltOptCategory)); -cl::opt -ForwardDistance("forward-distance", - cl::desc("The maximum distance (in bytes) of forward jumps for ExtTSP value"), - cl::init(1024), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); - -cl::opt -BackwardDistance("backward-distance", - cl::desc("The maximum distance (in bytes) of backward jumps for ExtTSP value"), - cl::init(640), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt ForwardDistance( + "forward-distance", + cl::desc( + "The maximum distance (in bytes) of forward jumps for ExtTSP value"), + cl::init(1024), cl::ReallyHidden, cl::cat(BoltOptCategory)); +cl::opt BackwardDistance( + "backward-distance", + cl::desc( + "The maximum distance (in bytes) of backward jumps for ExtTSP value"), + cl::init(640), cl::ReallyHidden, cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/FrameAnalysis.cpp b/bolt/lib/Passes/FrameAnalysis.cpp index 7ccb72471617..afd8344bd480 100644 --- a/bolt/lib/Passes/FrameAnalysis.cpp +++ b/bolt/lib/Passes/FrameAnalysis.cpp @@ -35,12 +35,8 @@ static cl::opt FrameOptFunctionNamesFile( "funcs-file-fop", cl::desc("file with list of functions to frame optimize")); -static cl::opt -TimeFA("time-fa", - cl::desc("time frame analysis steps"), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt TimeFA("time-fa", cl::desc("time frame analysis steps"), + cl::ReallyHidden, cl::cat(BoltOptCategory)); bool shouldFrameOptimize(const llvm::bolt::BinaryFunction &Function) { if (Function.hasUnknownControlFlow()) diff --git a/bolt/lib/Passes/FrameOptimizer.cpp b/bolt/lib/Passes/FrameOptimizer.cpp index 4954cc7f94a7..8422d094a111 100644 --- a/bolt/lib/Passes/FrameOptimizer.cpp +++ b/bolt/lib/Passes/FrameOptimizer.cpp @@ -43,13 +43,10 @@ FrameOptimization("frame-opt", cl::ZeroOrMore, cl::cat(BoltOptCategory)); -cl::opt -RemoveStores("frame-opt-rm-stores", - cl::init(FOP_NONE), - cl::desc("apply additional analysis to remove stores (experimental)"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt RemoveStores( + "frame-opt-rm-stores", cl::init(FOP_NONE), + cl::desc("apply additional analysis to remove stores (experimental)"), + cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Passes/HFSortPlus.cpp b/bolt/lib/Passes/HFSortPlus.cpp index f2b30d2d86bf..fff9165810aa 100644 --- a/bolt/lib/Passes/HFSortPlus.cpp +++ b/bolt/lib/Passes/HFSortPlus.cpp @@ -37,45 +37,30 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; -cl::opt -ITLBPageSize("itlb-page-size", - cl::desc("The size of i-tlb cache page"), - cl::init(4096), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt ITLBPageSize("itlb-page-size", + cl::desc("The size of i-tlb cache page"), + cl::init(4096), cl::ReallyHidden, + cl::cat(BoltOptCategory)); -cl::opt -ITLBEntries("itlb-entries", - cl::desc("The number of entries in i-tlb cache"), - cl::init(16), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt ITLBEntries("itlb-entries", + cl::desc("The number of entries in i-tlb cache"), + cl::init(16), cl::ReallyHidden, + cl::cat(BoltOptCategory)); -static cl::opt -ITLBDensity("itlb-density", - cl::desc("The density of i-tlb cache"), - cl::init(4096), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt ITLBDensity("itlb-density", + cl::desc("The density of i-tlb cache"), + cl::init(4096), cl::ReallyHidden, + cl::cat(BoltOptCategory)); -static cl::opt -MergeProbability("merge-probability", - cl::desc("The minimum probability of a call for merging two clusters"), - cl::init(0.9), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt MergeProbability( + "merge-probability", + cl::desc("The minimum probability of a call for merging two clusters"), + cl::init(0.9), cl::ReallyHidden, cl::cat(BoltOptCategory)); -static cl::opt -ArcThreshold("arc-threshold", - cl::desc("The threshold for ignoring arcs with a small relative weight"), - cl::init(0.00000001), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt ArcThreshold( + "arc-threshold", + cl::desc("The threshold for ignoring arcs with a small relative weight"), + cl::init(0.00000001), cl::ReallyHidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Passes/IdenticalCodeFolding.cpp b/bolt/lib/Passes/IdenticalCodeFolding.cpp index c7c6ec7062e3..e9dc6171cdc1 100644 --- a/bolt/lib/Passes/IdenticalCodeFolding.cpp +++ b/bolt/lib/Passes/IdenticalCodeFolding.cpp @@ -29,12 +29,9 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; -static cl::opt -UseDFS("icf-dfs", - cl::desc("use DFS ordering when using -icf option"), - cl::ReallyHidden, - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt UseDFS("icf-dfs", + cl::desc("use DFS ordering when using -icf option"), + cl::ReallyHidden, cl::cat(BoltOptCategory)); static cl::opt TimeICF("time-icf", diff --git a/bolt/lib/Passes/IndirectCallPromotion.cpp b/bolt/lib/Passes/IndirectCallPromotion.cpp index 1ca29f475107..344874800752 100644 --- a/bolt/lib/Passes/IndirectCallPromotion.cpp +++ b/bolt/lib/Passes/IndirectCallPromotion.cpp @@ -44,7 +44,7 @@ static cl::opt ICPJTTotalPercentThreshold( cl::desc( "The percentage threshold against total count for the promotion for " "jump tables"), - cl::init(5), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + cl::init(5), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ICPCallsRemainingPercentThreshold( "icp-calls-remaining-percent-threshold", @@ -57,7 +57,7 @@ static cl::opt ICPCallsTotalPercentThreshold( cl::desc( "The percentage threshold against total count for the promotion for " "calls"), - cl::init(30), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + cl::init(30), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt ICPMispredictThreshold( "indirect-call-promotion-mispredict-threshold", @@ -71,7 +71,7 @@ static cl::opt ICPUseMispredicts( "should be applied at a callsite. The " "-indirect-call-promotion-mispredict-threshold value will be used " "by this heuristic"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::cat(BoltOptCategory)); static cl::opt ICPTopN("indirect-call-promotion-topn", diff --git a/bolt/lib/Passes/Inliner.cpp b/bolt/lib/Passes/Inliner.cpp index 85b8c16f174b..1d4fa8fa2935 100644 --- a/bolt/lib/Passes/Inliner.cpp +++ b/bolt/lib/Passes/Inliner.cpp @@ -38,10 +38,9 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; static cl::opt -AdjustProfile("inline-ap", - cl::desc("adjust function profile after inlining"), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + AdjustProfile("inline-ap", + cl::desc("adjust function profile after inlining"), + cl::cat(BoltOptCategory)); static cl::list ForceInlineFunctions("force-inline", @@ -51,68 +50,46 @@ ForceInlineFunctions("force-inline", cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -InlineAll("inline-all", - cl::desc("inline all functions"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt InlineAll("inline-all", cl::desc("inline all functions"), + cl::cat(BoltOptCategory)); -static cl::opt -InlineIgnoreLeafCFI("inline-ignore-leaf-cfi", - cl::desc("inline leaf functions with CFI programs (can break unwinding)"), - cl::init(true), - cl::ZeroOrMore, - cl::ReallyHidden, - cl::cat(BoltOptCategory)); +static cl::opt InlineIgnoreLeafCFI( + "inline-ignore-leaf-cfi", + cl::desc("inline leaf functions with CFI programs (can break unwinding)"), + cl::init(true), cl::ReallyHidden, cl::cat(BoltOptCategory)); -static cl::opt -InlineIgnoreCFI("inline-ignore-cfi", - cl::desc("inline functions with CFI programs (can break exception handling)"), - cl::init(false), - cl::ZeroOrMore, - cl::ReallyHidden, - cl::cat(BoltOptCategory)); +static cl::opt InlineIgnoreCFI( + "inline-ignore-cfi", + cl::desc( + "inline functions with CFI programs (can break exception handling)"), + cl::ReallyHidden, cl::cat(BoltOptCategory)); static cl::opt -InlineLimit("inline-limit", - cl::desc("maximum number of call sites to inline"), - cl::init(0), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + InlineLimit("inline-limit", + cl::desc("maximum number of call sites to inline"), cl::init(0), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -InlineMaxIters("inline-max-iters", - cl::desc("maximum number of inline iterations"), - cl::init(3), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + InlineMaxIters("inline-max-iters", + cl::desc("maximum number of inline iterations"), cl::init(3), + cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -InlineSmallFunctions("inline-small-functions", - cl::desc("inline functions if increase in size is less than defined by " - "-inline-small-functions-bytes"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt InlineSmallFunctions( + "inline-small-functions", + cl::desc("inline functions if increase in size is less than defined by " + "-inline-small-functions-bytes"), + cl::cat(BoltOptCategory)); -static cl::opt -InlineSmallFunctionsBytes("inline-small-functions-bytes", - cl::desc("max number of bytes for the function to be considered small for " - "inlining purposes"), - cl::init(4), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt InlineSmallFunctionsBytes( + "inline-small-functions-bytes", + cl::desc("max number of bytes for the function to be considered small for " + "inlining purposes"), + cl::init(4), cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -NoInline("no-inline", - cl::desc("disable all inlining (overrides other inlining options)"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt NoInline( + "no-inline", + cl::desc("disable all inlining (overrides other inlining options)"), + cl::cat(BoltOptCategory)); /// This function returns true if any of inlining options are specified and the /// inlining pass should be executed. Whenever a new inlining option is added, diff --git a/bolt/lib/Passes/LongJmp.cpp b/bolt/lib/Passes/LongJmp.cpp index 24139f2b9ee1..96c0e7486f9c 100644 --- a/bolt/lib/Passes/LongJmp.cpp +++ b/bolt/lib/Passes/LongJmp.cpp @@ -23,12 +23,9 @@ extern cl::opt AlignFunctions; extern cl::opt UseOldText; extern cl::opt HotFunctionsAtEnd; -static cl::opt -GroupStubs("group-stubs", - cl::desc("share stubs across functions"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt GroupStubs("group-stubs", + cl::desc("share stubs across functions"), + cl::init(true), cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/MCF.cpp b/bolt/lib/Passes/MCF.cpp index b1c7de907d15..4ba737da41cf 100644 --- a/bolt/lib/Passes/MCF.cpp +++ b/bolt/lib/Passes/MCF.cpp @@ -30,31 +30,23 @@ extern cl::OptionCategory BoltOptCategory; extern cl::opt TimeOpts; -static cl::opt -IterativeGuess("iterative-guess", - cl::desc("in non-LBR mode, guess edge counts using iterative technique"), - cl::ZeroOrMore, - cl::init(false), - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt IterativeGuess( + "iterative-guess", + cl::desc("in non-LBR mode, guess edge counts using iterative technique"), + + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -EqualizeBBCounts("equalize-bb-counts", - cl::desc("in non-LBR mode, use same count for BBs " - "that should have equivalent count"), - cl::ZeroOrMore, - cl::init(false), - cl::Hidden, - cl::cat(BoltOptCategory)); + EqualizeBBCounts("equalize-bb-counts", + cl::desc("in non-LBR mode, use same count for BBs " + "that should have equivalent count"), + cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -UseRArcs("mcf-use-rarcs", - cl::desc("in MCF, consider the possibility of cancelling flow to balance " - "edges"), - cl::ZeroOrMore, - cl::init(false), - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt UseRArcs( + "mcf-use-rarcs", + cl::desc("in MCF, consider the possibility of cancelling flow to balance " + "edges"), + cl::Hidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Passes/PatchEntries.cpp b/bolt/lib/Passes/PatchEntries.cpp index e049dee97e43..9cb1314ab9c9 100644 --- a/bolt/lib/Passes/PatchEntries.cpp +++ b/bolt/lib/Passes/PatchEntries.cpp @@ -22,13 +22,9 @@ extern llvm::cl::OptionCategory BoltCategory; extern llvm::cl::opt Verbosity; llvm::cl::opt -ForcePatch("force-patch", - llvm::cl::desc("force patching of original entry points"), - llvm::cl::init(false), - llvm::cl::Hidden, - llvm::cl::ZeroOrMore, - llvm::cl::cat(BoltCategory)); - + ForcePatch("force-patch", + llvm::cl::desc("force patching of original entry points"), + llvm::cl::Hidden, llvm::cl::cat(BoltCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/RegAnalysis.cpp b/bolt/lib/Passes/RegAnalysis.cpp index ca66b24842dd..eab16cb09032 100644 --- a/bolt/lib/Passes/RegAnalysis.cpp +++ b/bolt/lib/Passes/RegAnalysis.cpp @@ -24,12 +24,9 @@ namespace opts { extern cl::opt Verbosity; extern cl::OptionCategory BoltOptCategory; -cl::opt AssumeABI( - "assume-abi", - cl::desc("assume the ABI is never violated"), - cl::ZeroOrMore, - cl::init(false), - cl::cat(BoltOptCategory)); +cl::opt AssumeABI("assume-abi", + cl::desc("assume the ABI is never violated"), + cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/RegReAssign.cpp b/bolt/lib/Passes/RegReAssign.cpp index b1b1d6a38cd0..d4f12222ec4d 100644 --- a/bolt/lib/Passes/RegReAssign.cpp +++ b/bolt/lib/Passes/RegReAssign.cpp @@ -26,14 +26,11 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; extern cl::opt UpdateDebugSections; -static cl::opt -AggressiveReAssign("use-aggr-reg-reassign", - cl::desc("use register liveness analysis to try to find more opportunities " - "for -reg-reassign optimization"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); - +static cl::opt AggressiveReAssign( + "use-aggr-reg-reassign", + cl::desc("use register liveness analysis to try to find more opportunities " + "for -reg-reassign optimization"), + cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/ReorderAlgorithm.cpp b/bolt/lib/Passes/ReorderAlgorithm.cpp index 60da527d5345..62752b077ce5 100644 --- a/bolt/lib/Passes/ReorderAlgorithm.cpp +++ b/bolt/lib/Passes/ReorderAlgorithm.cpp @@ -38,20 +38,12 @@ static cl::opt ColdThreshold( "samples). Default: 0 "), cl::init(0), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -PrintClusters("print-clusters", - cl::desc("print clusters"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt PrintClusters("print-clusters", cl::desc("print clusters"), + cl::Hidden, cl::cat(BoltOptCategory)); -cl::opt -RandomSeed("bolt-seed", - cl::desc("seed for randomization"), - cl::init(42), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +cl::opt RandomSeed("bolt-seed", cl::desc("seed for randomization"), + cl::init(42), cl::Hidden, + cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Passes/ReorderData.cpp b/bolt/lib/Passes/ReorderData.cpp index 53c7e8dfb62f..3f36caba53ae 100644 --- a/bolt/lib/Passes/ReorderData.cpp +++ b/bolt/lib/Passes/ReorderData.cpp @@ -30,11 +30,9 @@ extern cl::OptionCategory BoltOptCategory; extern cl::opt JumpTables; static cl::opt -PrintReorderedData("print-reordered-data", - cl::desc("print section contents after reordering"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + PrintReorderedData("print-reordered-data", + cl::desc("print section contents after reordering"), + cl::Hidden, cl::cat(BoltCategory)); cl::list ReorderData("reorder-data", @@ -63,18 +61,14 @@ ReorderAlgorithm("reorder-data-algo", cl::cat(BoltOptCategory)); static cl::opt -ReorderDataMaxSymbols("reorder-data-max-symbols", - cl::desc("maximum number of symbols to reorder"), - cl::ZeroOrMore, - cl::init(std::numeric_limits::max()), - cl::cat(BoltOptCategory)); + ReorderDataMaxSymbols("reorder-data-max-symbols", + cl::desc("maximum number of symbols to reorder"), + cl::init(std::numeric_limits::max()), + cl::cat(BoltOptCategory)); -static cl::opt -ReorderDataMaxBytes("reorder-data-max-bytes", - cl::desc("maximum number of bytes to reorder"), - cl::ZeroOrMore, - cl::init(std::numeric_limits::max()), - cl::cat(BoltOptCategory)); +static cl::opt ReorderDataMaxBytes( + "reorder-data-max-bytes", cl::desc("maximum number of bytes to reorder"), + cl::init(std::numeric_limits::max()), cl::cat(BoltOptCategory)); static cl::list ReorderSymbols("reorder-symbols", @@ -92,13 +86,10 @@ SkipSymbols("reorder-skip-symbols", cl::Hidden, cl::cat(BoltCategory)); -static cl::opt -ReorderInplace("reorder-data-inplace", - cl::desc("reorder data sections in place"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt ReorderInplace("reorder-data-inplace", + cl::desc("reorder data sections in place"), + cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Passes/ReorderFunctions.cpp b/bolt/lib/Passes/ReorderFunctions.cpp index ed58404c7ff7..b6eb147514f0 100644 --- a/bolt/lib/Passes/ReorderFunctions.cpp +++ b/bolt/lib/Passes/ReorderFunctions.cpp @@ -55,12 +55,10 @@ ReorderFunctions("reorder-functions", cl::ZeroOrMore, cl::cat(BoltOptCategory)); -static cl::opt -ReorderFunctionsUseHotSize("reorder-functions-use-hot-size", - cl::desc("use a function's hot size when doing clustering"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt ReorderFunctionsUseHotSize( + "reorder-functions-use-hot-size", + cl::desc("use a function's hot size when doing clustering"), cl::init(true), + cl::cat(BoltOptCategory)); static cl::opt FunctionOrderFile("function-order", @@ -81,11 +79,9 @@ LinkSectionsFile("generate-link-sections", cl::cat(BoltOptCategory)); static cl::opt -UseEdgeCounts("use-edge-counts", - cl::desc("use edge count data when doing clustering"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); + UseEdgeCounts("use-edge-counts", + cl::desc("use edge count data when doing clustering"), + cl::init(true), cl::cat(BoltOptCategory)); static cl::opt CgFromPerfData("cg-from-perf-data", @@ -95,12 +91,10 @@ CgFromPerfData("cg-from-perf-data", cl::ZeroOrMore, cl::cat(BoltOptCategory)); -static cl::opt -CgIgnoreRecursiveCalls("cg-ignore-recursive-calls", - cl::desc("ignore recursive calls when constructing the call graph"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt CgIgnoreRecursiveCalls( + "cg-ignore-recursive-calls", + cl::desc("ignore recursive calls when constructing the call graph"), + cl::init(true), cl::cat(BoltOptCategory)); static cl::opt CgUseSplitHotSize("cg-use-split-hot-size", diff --git a/bolt/lib/Passes/RetpolineInsertion.cpp b/bolt/lib/Passes/RetpolineInsertion.cpp index c91c185a0665..160507ac4e37 100644 --- a/bolt/lib/Passes/RetpolineInsertion.cpp +++ b/bolt/lib/Passes/RetpolineInsertion.cpp @@ -32,12 +32,9 @@ namespace opts { extern cl::OptionCategory BoltCategory; -llvm::cl::opt -InsertRetpolines("insert-retpolines", - cl::desc("run retpoline insertion pass"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +llvm::cl::opt InsertRetpolines("insert-retpolines", + cl::desc("run retpoline insertion pass"), + cl::cat(BoltCategory)); llvm::cl::opt RetpolineLfence("retpoline-lfence", diff --git a/bolt/lib/Passes/SplitFunctions.cpp b/bolt/lib/Passes/SplitFunctions.cpp index d89e72c34199..5e80620074dd 100644 --- a/bolt/lib/Passes/SplitFunctions.cpp +++ b/bolt/lib/Passes/SplitFunctions.cpp @@ -29,21 +29,18 @@ extern cl::OptionCategory BoltOptCategory; extern cl::opt SplitEH; extern cl::opt ExecutionCountThreshold; -static cl::opt -AggressiveSplitting("split-all-cold", - cl::desc("outline as many cold basic blocks as possible"), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +static cl::opt AggressiveSplitting( + "split-all-cold", cl::desc("outline as many cold basic blocks as possible"), + cl::cat(BoltOptCategory)); -static cl::opt -SplitAlignThreshold("split-align-threshold", - cl::desc("when deciding to split a function, apply this alignment " - "while doing the size comparison (see -split-threshold). " - "Default value: 2."), - cl::init(2), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt SplitAlignThreshold( + "split-align-threshold", + cl::desc("when deciding to split a function, apply this alignment " + "while doing the size comparison (see -split-threshold). " + "Default value: 2."), + cl::init(2), + + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt SplitFunctions("split-functions", @@ -61,16 +58,13 @@ SplitFunctions("split-functions", cl::ZeroOrMore, cl::cat(BoltOptCategory)); -static cl::opt -SplitThreshold("split-threshold", - cl::desc("split function only if its main size is reduced by more than " - "given amount of bytes. Default value: 0, i.e. split iff the " - "size is reduced. Note that on some architectures the size can " - "increase after splitting."), - cl::init(0), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt SplitThreshold( + "split-threshold", + cl::desc("split function only if its main size is reduced by more than " + "given amount of bytes. Default value: 0, i.e. split iff the " + "size is reduced. Note that on some architectures the size can " + "increase after splitting."), + cl::init(0), cl::Hidden, cl::cat(BoltOptCategory)); void syncOptions(BinaryContext &BC) { if (!BC.HasRelocations && opts::SplitFunctions == SplitFunctions::ST_LARGE) diff --git a/bolt/lib/Passes/TailDuplication.cpp b/bolt/lib/Passes/TailDuplication.cpp index e86fe1ad0779..21bd44fa4ffb 100644 --- a/bolt/lib/Passes/TailDuplication.cpp +++ b/bolt/lib/Passes/TailDuplication.cpp @@ -43,7 +43,7 @@ static cl::opt TailDuplicationMinimumOffset("tail-duplication-minimum-offset", cl::desc("minimum offset needed between block " "and successor to allow duplication"), - cl::ZeroOrMore, cl::ReallyHidden, cl::init(64), + cl::ReallyHidden, cl::init(64), cl::cat(BoltOptCategory)); static cl::opt TailDuplicationMaximumDuplication( @@ -56,7 +56,7 @@ static cl::opt TailDuplicationMinimumDuplication( "tail-duplication-minimum-duplication", cl::desc("tail blocks with size (in bytes) not exceeding the value are " "always duplicated"), - cl::ZeroOrMore, cl::ReallyHidden, cl::init(2), cl::cat(BoltOptCategory)); + cl::ReallyHidden, cl::init(2), cl::cat(BoltOptCategory)); static cl::opt TailDuplicationConstCopyPropagation( "tail-duplication-const-copy-propagation", diff --git a/bolt/lib/Passes/VeneerElimination.cpp b/bolt/lib/Passes/VeneerElimination.cpp index d1f25e5312fc..dcfd553f729d 100644 --- a/bolt/lib/Passes/VeneerElimination.cpp +++ b/bolt/lib/Passes/VeneerElimination.cpp @@ -21,12 +21,9 @@ namespace opts { extern cl::OptionCategory BoltOptCategory; static llvm::cl::opt -EliminateVeneers("elim-link-veneers", - cl::desc("run veneer elimination pass"), - cl::init(true), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + EliminateVeneers("elim-link-veneers", + cl::desc("run veneer elimination pass"), cl::init(true), + cl::Hidden, cl::cat(BoltOptCategory)); } // namespace opts namespace llvm { diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 314ab8969d43..9942a4033807 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -40,11 +40,9 @@ using namespace bolt; namespace opts { static cl::opt -BasicAggregation("nl", - cl::desc("aggregate basic samples (without LBR info)"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(AggregatorCategory)); + BasicAggregation("nl", + cl::desc("aggregate basic samples (without LBR info)"), + cl::cat(AggregatorCategory)); static cl::opt FilterMemProfile("filter-mem-profile", @@ -66,12 +64,10 @@ IgnoreBuildID("ignore-build-id", cl::init(false), cl::cat(AggregatorCategory)); -static cl::opt -IgnoreInterruptLBR("ignore-interrupt-lbr", - cl::desc("ignore kernel interrupt LBR that happens asynchronously"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(AggregatorCategory)); +static cl::opt IgnoreInterruptLBR( + "ignore-interrupt-lbr", + cl::desc("ignore kernel interrupt LBR that happens asynchronously"), + cl::init(true), cl::cat(AggregatorCategory)); static cl::opt MaxSamples("max-samples", @@ -81,12 +77,9 @@ MaxSamples("max-samples", cl::Hidden, cl::cat(AggregatorCategory)); -static cl::opt -ReadPreAggregated("pa", - cl::desc("skip perf and read data from a pre-aggregated file format"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(AggregatorCategory)); +static cl::opt ReadPreAggregated( + "pa", cl::desc("skip perf and read data from a pre-aggregated file format"), + cl::cat(AggregatorCategory)); static cl::opt TimeAggregator("time-aggr", @@ -96,18 +89,13 @@ TimeAggregator("time-aggr", cl::cat(AggregatorCategory)); static cl::opt -UseEventPC("use-event-pc", - cl::desc("use event PC in combination with LBR sampling"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(AggregatorCategory)); + UseEventPC("use-event-pc", + cl::desc("use event PC in combination with LBR sampling"), + cl::cat(AggregatorCategory)); -static cl::opt -WriteAutoFDOData("autofdo", - cl::desc("generate autofdo textual data instead of bolt data"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(AggregatorCategory)); +static cl::opt WriteAutoFDOData( + "autofdo", cl::desc("generate autofdo textual data instead of bolt data"), + cl::cat(AggregatorCategory)); } // namespace opts diff --git a/bolt/lib/Profile/YAMLProfileReader.cpp b/bolt/lib/Profile/YAMLProfileReader.cpp index 1ccdb2e974f7..59819b4ce6cd 100644 --- a/bolt/lib/Profile/YAMLProfileReader.cpp +++ b/bolt/lib/Profile/YAMLProfileReader.cpp @@ -22,13 +22,9 @@ extern cl::opt Verbosity; extern cl::OptionCategory BoltOptCategory; static llvm::cl::opt -IgnoreHash("profile-ignore-hash", - cl::desc("ignore hash while reading function profile"), - cl::init(false), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); - + IgnoreHash("profile-ignore-hash", + cl::desc("ignore hash while reading function profile"), + cl::Hidden, cl::cat(BoltOptCategory)); } namespace llvm { diff --git a/bolt/lib/Rewrite/BinaryPassManager.cpp b/bolt/lib/Rewrite/BinaryPassManager.cpp index 5a758397b772..3230fad99df8 100644 --- a/bolt/lib/Rewrite/BinaryPassManager.cpp +++ b/bolt/lib/Rewrite/BinaryPassManager.cpp @@ -59,16 +59,14 @@ static cl::opt cl::desc("eliminate unreachable code"), cl::init(true), cl::cat(BoltOptCategory)); -cl::opt -ICF("icf", - cl::desc("fold functions with identical code"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); +cl::opt ICF("icf", cl::desc("fold functions with identical code"), + cl::cat(BoltOptCategory)); -static cl::opt -JTFootprintReductionFlag("jt-footprint-reduction", - cl::desc("make jump tables size smaller at the cost of using more " - "instructions at jump sites"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt JTFootprintReductionFlag( + "jt-footprint-reduction", + cl::desc("make jump tables size smaller at the cost of using more " + "instructions at jump sites"), + cl::cat(BoltOptCategory)); cl::opt NeverPrint("never-print", cl::desc("never print"), cl::ReallyHidden, cl::cat(BoltOptCategory)); @@ -89,94 +87,91 @@ PrintFinalized("print-finalized", cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintFOP("print-fop", - cl::desc("print functions after frame optimizer pass"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintFOP("print-fop", + cl::desc("print functions after frame optimizer pass"), cl::Hidden, + cl::cat(BoltOptCategory)); static cl::opt -PrintICF("print-icf", - cl::desc("print functions after ICF optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintICF("print-icf", cl::desc("print functions after ICF optimization"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintICP("print-icp", - cl::desc("print functions after indirect call promotion"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintICP("print-icp", + cl::desc("print functions after indirect call promotion"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintInline("print-inline", - cl::desc("print functions after inlining optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintInline("print-inline", + cl::desc("print functions after inlining optimization"), + cl::Hidden, cl::cat(BoltOptCategory)); + +static cl::opt PrintJTFootprintReduction( + "print-after-jt-footprint-reduction", + cl::desc("print function after jt-footprint-reduction pass"), + cl::cat(BoltOptCategory)); static cl::opt -PrintJTFootprintReduction("print-after-jt-footprint-reduction", - cl::desc("print function after jt-footprint-reduction pass"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); - -static cl::opt -PrintLongJmp("print-longjmp", - cl::desc("print functions after longjmp pass"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintLongJmp("print-longjmp", + cl::desc("print functions after longjmp pass"), cl::Hidden, + cl::cat(BoltOptCategory)); cl::opt -PrintNormalized("print-normalized", - cl::desc("print functions after CFG is normalized"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); + PrintNormalized("print-normalized", + cl::desc("print functions after CFG is normalized"), + cl::Hidden, cl::cat(BoltCategory)); + +static cl::opt PrintOptimizeBodyless( + "print-optimize-bodyless", + cl::desc("print functions after bodyless optimization"), cl::Hidden, + cl::cat(BoltOptCategory)); static cl::opt -PrintOptimizeBodyless("print-optimize-bodyless", - cl::desc("print functions after bodyless optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintPeepholes("print-peepholes", + cl::desc("print functions after peephole optimization"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintPeepholes("print-peepholes", - cl::desc("print functions after peephole optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintPLT("print-plt", cl::desc("print functions after PLT optimization"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintPLT("print-plt", - cl::desc("print functions after PLT optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintProfileStats("print-profile-stats", + cl::desc("print profile quality/bias analysis"), + cl::cat(BoltCategory)); static cl::opt -PrintProfileStats("print-profile-stats", - cl::desc("print profile quality/bias analysis"), - cl::ZeroOrMore, cl::init(false), cl::cat(BoltCategory)); - -static cl::opt -PrintRegReAssign("print-regreassign", - cl::desc("print functions after regreassign pass"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintRegReAssign("print-regreassign", + cl::desc("print functions after regreassign pass"), + cl::Hidden, cl::cat(BoltOptCategory)); cl::opt -PrintReordered("print-reordered", - cl::desc("print functions after layout optimization"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintReordered("print-reordered", + cl::desc("print functions after layout optimization"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintReorderedFunctions("print-reordered-functions", - cl::desc("print functions after clustering"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintReorderedFunctions("print-reordered-functions", + cl::desc("print functions after clustering"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt PrintRetpolineInsertion( "print-retpoline-insertion", cl::desc("print functions after retpoline insertion pass"), cl::cat(BoltCategory)); -static cl::opt -PrintSCTC("print-sctc", - cl::desc("print functions after conditional tail call simplification"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); +static cl::opt PrintSCTC( + "print-sctc", + cl::desc("print functions after conditional tail call simplification"), + cl::Hidden, cl::cat(BoltOptCategory)); + +static cl::opt PrintSimplifyROLoads( + "print-simplify-rodata-loads", + cl::desc("print functions after simplification of RO data loads"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -PrintSimplifyROLoads("print-simplify-rodata-loads", - cl::desc("print functions after simplification of RO data loads"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); - -static cl::opt -PrintSplit("print-split", - cl::desc("print functions after code splitting"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintSplit("print-split", cl::desc("print functions after code splitting"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt PrintStoke("print-stoke", cl::desc("print functions after stoke analysis"), @@ -188,9 +183,9 @@ static cl::opt PrintVeneerElimination( cl::cat(BoltOptCategory)); static cl::opt -PrintUCE("print-uce", - cl::desc("print functions after unreachable code elimination"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory)); + PrintUCE("print-uce", + cl::desc("print functions after unreachable code elimination"), + cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt RegReAssign( "reg-reassign", @@ -203,11 +198,11 @@ static cl::opt SimplifyConditionalTailCalls( cl::desc("simplify conditional tail calls by removing unnecessary jumps"), cl::init(true), cl::cat(BoltOptCategory)); -static cl::opt -SimplifyRODataLoads("simplify-rodata-loads", - cl::desc("simplify loads from read-only sections by replacing the memory " - "operand with the constant found in the corresponding section"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); +static cl::opt SimplifyRODataLoads( + "simplify-rodata-loads", + cl::desc("simplify loads from read-only sections by replacing the memory " + "operand with the constant found in the corresponding section"), + cl::cat(BoltOptCategory)); static cl::list SpecializeMemcpy1("memcpy1-spec", @@ -233,14 +228,14 @@ 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", - cl::desc("reorder three way branches"), - cl::ZeroOrMore, cl::ReallyHidden, cl::cat(BoltOptCategory)); +static cl::opt ThreeWayBranchFlag("three-way-branch", + cl::desc("reorder three way branches"), + cl::ReallyHidden, + cl::cat(BoltOptCategory)); static cl::opt CMOVConversionFlag("cmov-conversion", cl::desc("fold jcc+mov into cmov"), - cl::ZeroOrMore, cl::ReallyHidden, + cl::ReallyHidden, cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Rewrite/BoltDiff.cpp b/bolt/lib/Rewrite/BoltDiff.cpp index fc7fb8efa243..b1ea6d50692a 100644 --- a/bolt/lib/Rewrite/BoltDiff.cpp +++ b/bolt/lib/Rewrite/BoltDiff.cpp @@ -28,76 +28,58 @@ extern cl::OptionCategory BoltDiffCategory; extern cl::opt NeverPrint; extern cl::opt ICF; -static cl::opt -IgnoreLTOSuffix("ignore-lto-suffix", - cl::desc("ignore lto_priv or const suffixes when matching functions"), - cl::init(true), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); +static cl::opt IgnoreLTOSuffix( + "ignore-lto-suffix", + cl::desc("ignore lto_priv or const suffixes when matching functions"), + cl::init(true), cl::cat(BoltDiffCategory)); + +static cl::opt PrintUnmapped( + "print-unmapped", + cl::desc("print functions of binary 2 that were not matched to any " + "function in binary 1"), + cl::cat(BoltDiffCategory)); + +static cl::opt PrintProfiledUnmapped( + "print-profiled-unmapped", + cl::desc("print functions that have profile in binary 1 but do not " + "in binary 2"), + cl::cat(BoltDiffCategory)); + +static cl::opt PrintDiffCFG( + "print-diff-cfg", + cl::desc("print the CFG of important functions that changed in " + "binary 2"), + cl::cat(BoltDiffCategory)); static cl::opt -PrintUnmapped("print-unmapped", - cl::desc("print functions of binary 2 that were not matched to any " - "function in binary 1"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); + PrintDiffBBs("print-diff-bbs", + cl::desc("print the basic blocks showed in top differences"), + cl::cat(BoltDiffCategory)); -static cl::opt -PrintProfiledUnmapped("print-profiled-unmapped", - cl::desc("print functions that have profile in binary 1 but do not " - "in binary 2"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); +static cl::opt MatchByHash( + "match-by-hash", + cl::desc("match functions in binary 2 to binary 1 if they have the same " + "hash of a function in binary 1"), + cl::cat(BoltDiffCategory)); -static cl::opt -PrintDiffCFG("print-diff-cfg", - cl::desc("print the CFG of important functions that changed in " - "binary 2"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); +static cl::opt IgnoreUnchanged( + "ignore-unchanged", + cl::desc("do not diff functions whose contents have not been changed from " + "one binary to another"), + cl::cat(BoltDiffCategory)); -static cl::opt -PrintDiffBBs("print-diff-bbs", - cl::desc("print the basic blocks showed in top differences"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); +static cl::opt DisplayCount( + "display-count", + cl::desc("number of functions to display when printing the top largest " + "differences in function activity"), + cl::init(10), cl::cat(BoltDiffCategory)); -static cl::opt -MatchByHash("match-by-hash", - cl::desc("match functions in binary 2 to binary 1 if they have the same " - "hash of a function in binary 1"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); - -static cl::opt -IgnoreUnchanged("ignore-unchanged", - cl::desc("do not diff functions whose contents have not been changed from " - "one binary to another"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); - -static cl::opt -DisplayCount("display-count", - cl::desc("number of functions to display when printing the top largest " - "differences in function activity"), - cl::init(10), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); - -static cl::opt -NormalizeByBin1("normalize-by-bin1", - cl::desc("show execution count of functions in binary 2 as a ratio of the " - "total samples in binary 1 - make sure both profiles have equal " - "collection time and sampling rate for this to make sense"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltDiffCategory)); +static cl::opt NormalizeByBin1( + "normalize-by-bin1", + cl::desc("show execution count of functions in binary 2 as a ratio of the " + "total samples in binary 1 - make sure both profiles have equal " + "collection time and sampling rate for this to make sense"), + cl::cat(BoltDiffCategory)); } // end namespace opts diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index b88dbbd7d456..d0fc59176765 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -102,12 +102,11 @@ extern cl::OptionCategory BoltCategory; extern cl::opt Verbosity; extern cl::opt OutputFilename; -static cl::opt -KeepARanges("keep-aranges", - cl::desc("keep or generate .debug_aranges section if .gdb_index is written"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt KeepARanges( + "keep-aranges", + cl::desc( + "keep or generate .debug_aranges section if .gdb_index is written"), + cl::Hidden, cl::cat(BoltCategory)); static cl::opt DeterministicDebugInfo("deterministic-debuginfo", diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index 0f1d642aa161..0bf6f8407412 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -80,20 +80,17 @@ extern cl::list ReorderData; extern cl::opt ReorderFunctions; extern cl::opt TimeBuild; -static cl::opt -ForceToDataRelocations("force-data-relocations", - cl::desc("force relocations to data sections to always be processed"), - cl::init(false), - cl::Hidden, - cl::ZeroOrMore, - cl::cat(BoltCategory)); +static cl::opt ForceToDataRelocations( + "force-data-relocations", + cl::desc("force relocations to data sections to always be processed"), + + cl::Hidden, cl::cat(BoltCategory)); cl::opt -BoltID("bolt-id", - cl::desc("add any string to tag this execution in the " - "output binary via bolt info section"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); + BoltID("bolt-id", + cl::desc("add any string to tag this execution in the " + "output binary via bolt info section"), + cl::cat(BoltCategory)); cl::opt AllowStripped("allow-stripped", @@ -105,7 +102,7 @@ cl::opt DumpDotAll( "dump-dot-all", cl::desc("dump function CFGs to graphviz format after each stage;" "enable '-print-loops' for color-coded blocks"), - cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); + cl::Hidden, cl::cat(BoltCategory)); static cl::list ForceFunctionNames("funcs", @@ -137,12 +134,8 @@ KeepTmp("keep-tmp", cl::Hidden, cl::cat(BoltCategory)); -cl::opt -Lite("lite", - cl::desc("skip processing of cold functions"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +cl::opt Lite("lite", cl::desc("skip processing of cold functions"), + cl::cat(BoltCategory)); static cl::opt LiteThresholdPct("lite-threshold-pct", @@ -155,72 +148,49 @@ LiteThresholdPct("lite-threshold-pct", cl::Hidden, cl::cat(BoltOptCategory)); -static cl::opt -LiteThresholdCount("lite-threshold-count", - cl::desc("similar to '-lite-threshold-pct' but specify threshold using " - "absolute function call count. I.e. limit processing to functions " - "executed at least the specified number of times."), - cl::init(0), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); +static cl::opt LiteThresholdCount( + "lite-threshold-count", + cl::desc("similar to '-lite-threshold-pct' but specify threshold using " + "absolute function call count. I.e. limit processing to functions " + "executed at least the specified number of times."), + cl::init(0), cl::Hidden, cl::cat(BoltOptCategory)); static cl::opt -MaxFunctions("max-funcs", - cl::desc("maximum number of functions to process"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + MaxFunctions("max-funcs", + cl::desc("maximum number of functions to process"), cl::Hidden, + cl::cat(BoltCategory)); -static cl::opt -MaxDataRelocations("max-data-relocations", - cl::desc("maximum number of data relocations to process"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt MaxDataRelocations( + "max-data-relocations", + cl::desc("maximum number of data relocations to process"), cl::Hidden, + cl::cat(BoltCategory)); -cl::opt -PrintAll("print-all", - cl::desc("print functions after each stage"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +cl::opt PrintAll("print-all", + cl::desc("print functions after each stage"), cl::Hidden, + cl::cat(BoltCategory)); -cl::opt -PrintCFG("print-cfg", - cl::desc("print functions after CFG construction"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +cl::opt PrintCFG("print-cfg", + cl::desc("print functions after CFG construction"), + cl::Hidden, cl::cat(BoltCategory)); cl::opt PrintDisasm("print-disasm", - cl::desc("print function after disassembly"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + cl::desc("print function after disassembly"), + cl::Hidden, cl::cat(BoltCategory)); static cl::opt -PrintGlobals("print-globals", - cl::desc("print global symbols after disassembly"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + PrintGlobals("print-globals", + cl::desc("print global symbols after disassembly"), cl::Hidden, + cl::cat(BoltCategory)); extern cl::opt PrintSections; -static cl::opt -PrintLoopInfo("print-loops", - cl::desc("print loop related information"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt PrintLoopInfo("print-loops", + cl::desc("print loop related information"), + cl::Hidden, cl::cat(BoltCategory)); -static cl::opt -PrintSDTMarkers("print-sdt", - cl::desc("print all SDT markers"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +static cl::opt PrintSDTMarkers("print-sdt", + cl::desc("print all SDT markers"), + cl::Hidden, cl::cat(BoltCategory)); enum PrintPseudoProbesOptions { PPP_None = 0, @@ -242,11 +212,9 @@ cl::opt PrintPseudoProbes( clEnumValN(PPP_All, "all", "enable all debugging printout")), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory)); -static cl::opt -RelocationMode("relocs", - cl::desc("use relocations in the binary (default=autodetect)"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +static cl::opt RelocationMode( + "relocs", cl::desc("use relocations in the binary (default=autodetect)"), + cl::cat(BoltCategory)); static cl::opt SaveProfile("w", @@ -286,11 +254,9 @@ UseGnuStack("use-gnu-stack", cl::cat(BoltCategory)); static cl::opt -TimeRewrite("time-rewrite", - cl::desc("print time spent in rewriting passes"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + TimeRewrite("time-rewrite", + cl::desc("print time spent in rewriting passes"), cl::Hidden, + cl::cat(BoltCategory)); static cl::opt SequentialDisassembly("sequential-disassembly", @@ -298,13 +264,9 @@ SequentialDisassembly("sequential-disassembly", cl::init(false), cl::cat(BoltOptCategory)); -static cl::opt -WriteBoltInfoSection("bolt-info", - cl::desc("write bolt info section in the output binary"), - cl::init(true), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOutputCategory)); +static cl::opt WriteBoltInfoSection( + "bolt-info", cl::desc("write bolt info section in the output binary"), + cl::init(true), cl::Hidden, cl::cat(BoltOutputCategory)); } // namespace opts diff --git a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp index 4acd6c992ab3..1d58f0c285de 100644 --- a/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/HugifyRuntimeLibrary.cpp @@ -31,7 +31,7 @@ cl::opt cl::desc("Automatically put hot code on 2MB page(s) (hugify) at " "runtime. No manual call to hugify is needed in the binary " "(which is what --hot-text relies on)."), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::cat(BoltOptCategory)); static cl::opt RuntimeHugifyLib( "runtime-hugify-lib", diff --git a/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp b/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp index db3195bcd122..002bfc821b41 100644 --- a/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp +++ b/bolt/lib/RuntimeLibs/InstrumentationRuntimeLibrary.cpp @@ -27,7 +27,7 @@ namespace opts { cl::opt RuntimeInstrumentationLib( "runtime-instrumentation-lib", cl::desc("specify file name of the runtime instrumentation library"), - cl::ZeroOrMore, cl::init("libbolt_rt_instr.a"), cl::cat(BoltOptCategory)); + cl::init("libbolt_rt_instr.a"), cl::cat(BoltOptCategory)); extern cl::opt InstrumentationFileAppendPID; extern cl::opt ConservativeInstrumentation; diff --git a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp index d3bc2ca479ae..9c4531412331 100644 --- a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp +++ b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp @@ -44,7 +44,7 @@ extern cl::OptionCategory BoltOptCategory; static cl::opt X86StripRedundantAddressSize( "x86-strip-redundant-address-size", cl::desc("Remove redundant Address-Size override prefix"), cl::init(true), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::cat(BoltOptCategory)); } // namespace opts diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index f7c1fa97d5d2..dde84e4f000b 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -40,12 +40,9 @@ cl::OptionCategory AggregatorCategory("Data aggregation options"); cl::OptionCategory BoltInstrCategory("BOLT instrumentation options"); cl::OptionCategory HeatmapCategory("Heatmap options"); -cl::opt -AlignText("align-text", - cl::desc("alignment of .text section"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); +cl::opt AlignText("align-text", + cl::desc("alignment of .text section"), cl::Hidden, + cl::cat(BoltCategory)); cl::opt AlignFunctions( "align-functions", @@ -103,19 +100,15 @@ cl::opt HeatmapMinAddress( cl::desc("minimum address considered valid for heatmap (default 0)"), cl::Optional, cl::cat(HeatmapCategory)); -cl::opt -HotData("hot-data", - cl::desc("hot data symbols support (relocation mode)"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +cl::opt HotData("hot-data", + cl::desc("hot data symbols support (relocation mode)"), + cl::cat(BoltCategory)); -cl::opt -HotFunctionsAtEnd( - "hot-functions-at-end", - cl::desc( - "if reorder-functions is used, order functions putting hottest last"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +cl::opt HotFunctionsAtEnd( + "hot-functions-at-end", + cl::desc( + "if reorder-functions is used, order functions putting hottest last"), + cl::cat(BoltCategory)); cl::opt HotText( "hot-text", @@ -128,7 +121,7 @@ cl::opt HotText( cl::opt Instrument("instrument", cl::desc("instrument code to generate accurate profile data"), - cl::ZeroOrMore, cl::cat(BoltOptCategory)); + cl::cat(BoltOptCategory)); cl::opt OutputFilename("o", @@ -149,52 +142,37 @@ PerfDataA("p", cl::aliasopt(PerfData), cl::cat(AggregatorCategory)); -cl::opt -PrintCacheMetrics("print-cache-metrics", - cl::desc("calculate and print various metrics for instruction cache"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt PrintCacheMetrics( + "print-cache-metrics", + cl::desc("calculate and print various metrics for instruction cache"), + cl::cat(BoltOptCategory)); + +cl::opt PrintSections("print-sections", + cl::desc("print all registered sections"), + cl::Hidden, cl::cat(BoltCategory)); + +cl::opt SplitEH("split-eh", cl::desc("split C++ exception handling code"), + cl::Hidden, cl::cat(BoltOptCategory)); cl::opt - PrintSections("print-sections", - cl::desc("print all registered sections"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltCategory)); + StrictMode("strict", + cl::desc("trust the input to be from a well-formed source"), -cl::opt -SplitEH("split-eh", - cl::desc("split C++ exception handling code"), - cl::ZeroOrMore, - cl::Hidden, - cl::cat(BoltOptCategory)); + cl::cat(BoltCategory)); -cl::opt -StrictMode("strict", - cl::desc("trust the input to be from a well-formed source"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +llvm::cl::opt TimeOpts("time-opts", + cl::desc("print time spent in each optimization"), + cl::cat(BoltOptCategory)); -llvm::cl::opt -TimeOpts("time-opts", - cl::desc("print time spent in each optimization"), - cl::init(false), - cl::ZeroOrMore, - cl::cat(BoltOptCategory)); +cl::opt UseOldText( + "use-old-text", + cl::desc("re-use space in old .text if possible (relocation mode)"), + cl::cat(BoltCategory)); -cl::opt -UseOldText("use-old-text", - cl::desc("re-use space in old .text if possible (relocation mode)"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); - -cl::opt -UpdateDebugSections("update-debug-sections", - cl::desc("update DWARF debug sections of the executable"), - cl::ZeroOrMore, - cl::cat(BoltCategory)); +cl::opt UpdateDebugSections( + "update-debug-sections", + cl::desc("update DWARF debug sections of the executable"), + cl::cat(BoltCategory)); cl::opt Verbosity("v",