mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
[bolt] Remove unneeded cl::ZeroOrMore for cl::opt options
This commit is contained in:
parent
3583826bb5
commit
b92436efcb
@ -47,12 +47,9 @@ using namespace llvm;
|
||||
|
||||
namespace opts {
|
||||
|
||||
cl::opt<bool>
|
||||
NoHugePages("no-huge-pages",
|
||||
cl::desc("use regular size pages for code alignment"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> NoHugePages("no-huge-pages",
|
||||
cl::desc("use regular size pages for code alignment"),
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintDebugInfo("print-debug-info",
|
||||
@ -61,12 +58,10 @@ PrintDebugInfo("print-debug-info",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
PrintRelocations("print-relocations",
|
||||
cl::desc("print relocations when printing functions/objects"),
|
||||
cl::Hidden,
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> PrintRelocations(
|
||||
"print-relocations",
|
||||
cl::desc("print relocations when printing functions/objects"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintMemData("print-mem-data",
|
||||
|
@ -25,11 +25,9 @@ extern cl::OptionCategory BoltCategory;
|
||||
extern cl::opt<unsigned> Verbosity;
|
||||
|
||||
cl::opt<bool>
|
||||
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; }
|
||||
|
@ -34,12 +34,8 @@ namespace opts {
|
||||
extern cl::opt<JumpTableSupportLevel> JumpTables;
|
||||
extern cl::opt<bool> PreserveBlocksAlignment;
|
||||
|
||||
cl::opt<bool>
|
||||
AlignBlocks("align-blocks",
|
||||
cl::desc("align basic blocks"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::opt<bool> AlignBlocks("align-blocks", cl::desc("align basic blocks"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<MacroFusionType>
|
||||
AlignMacroOpFusion("align-macro-fusion",
|
||||
@ -70,20 +66,15 @@ FunctionPadSpec("pad-funcs",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<bool>
|
||||
PrintJumpTables("print-jump-tables",
|
||||
cl::desc("print jump tables"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
static cl::opt<bool> PrintJumpTables("print-jump-tables",
|
||||
cl::desc("print jump tables"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
X86AlignBranchBoundaryHotOnly("x86-align-branch-boundary-hot-only",
|
||||
|
@ -64,23 +64,18 @@ extern cl::opt<unsigned> Verbosity;
|
||||
|
||||
extern bool processAllFunctions();
|
||||
|
||||
cl::opt<bool>
|
||||
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<bool> 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<bool>
|
||||
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<bool> DotToolTipCode(
|
||||
"dot-tooltip-code",
|
||||
cl::desc("add basic block instructions as tool tips on nodes"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<JumpTableSupportLevel>
|
||||
JumpTables("jump-tables",
|
||||
@ -102,21 +97,17 @@ JumpTables("jump-tables",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<bool>
|
||||
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<bool>
|
||||
PrintDynoStats("dyno-stats",
|
||||
@ -139,11 +130,9 @@ PrintOnly("print-only",
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
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<bool>
|
||||
TrapOnAVX512("trap-avx512",
|
||||
|
@ -40,29 +40,20 @@ cl::opt<IndirectCallPromotionType> ICP(
|
||||
|
||||
extern cl::opt<JumpTableSupportLevel> JumpTables;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> FixFuncCounts(
|
||||
"fix-func-counts",
|
||||
cl::desc("adjust function counts based on basic blocks execution count"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool> 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<bool>
|
||||
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<bool>
|
||||
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
|
||||
|
||||
|
@ -39,11 +39,9 @@ extern llvm::cl::OptionCategory BoltCategory;
|
||||
extern llvm::cl::opt<unsigned> Verbosity;
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
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
|
||||
|
||||
|
@ -33,23 +33,19 @@ AlignBlocksMinSize("align-blocks-min-size",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<unsigned>
|
||||
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<unsigned> 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<unsigned>
|
||||
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<unsigned> AlignFunctionsMaxBytes(
|
||||
"align-functions-max-bytes",
|
||||
cl::desc("maximum number of bytes to use to align functions"), cl::init(32),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<unsigned>
|
||||
BlockAlignment("block-alignment",
|
||||
@ -59,11 +55,9 @@ BlockAlignment("block-alignment",
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
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
|
||||
|
||||
|
@ -30,7 +30,7 @@ extern cl::opt<unsigned> Verbosity;
|
||||
cl::opt<std::string> 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 {
|
||||
|
@ -69,13 +69,11 @@ enum DynoStatsSortOrder : char {
|
||||
Descending
|
||||
};
|
||||
|
||||
static cl::opt<DynoStatsSortOrder>
|
||||
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<DynoStatsSortOrder> 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<std::string>
|
||||
HotTextMoveSections("hot-text-move-sections",
|
||||
@ -97,13 +95,11 @@ bool isHotTextMover(const BinaryFunction &Function) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> MinBranchClusters(
|
||||
"min-branch-clusters",
|
||||
cl::desc("use a modified clustering algorithm geared towards minimizing "
|
||||
"branches"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::list<Peepholes::PeepholeOpts> Peepholes(
|
||||
"peepholes", cl::CommaSeparated, cl::desc("enable peephole optimizations"),
|
||||
@ -120,11 +116,9 @@ static cl::list<Peepholes::PeepholeOpts> Peepholes(
|
||||
cl::ZeroOrMore, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
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<bolt::DynoStats::Category>
|
||||
PrintSortedBy("print-sorted-by",
|
||||
@ -144,20 +138,14 @@ PrintSortedBy("print-sorted-by",
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks(
|
||||
"reorder-blocks", cl::desc("change layout of basic blocks in a function"),
|
||||
@ -192,21 +180,15 @@ cl::opt<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks(
|
||||
}
|
||||
}));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
ReportBadLayout("report-bad-layout",
|
||||
cl::desc("print top <uint> functions with suboptimal code layout on input"),
|
||||
cl::init(0),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<unsigned> ReportBadLayout(
|
||||
"report-bad-layout",
|
||||
cl::desc("print top <uint> functions with suboptimal code layout on input"),
|
||||
cl::init(0), cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<unsigned>
|
||||
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<unsigned> 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<unsigned>
|
||||
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<unsigned> 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
|
||||
|
||||
|
@ -45,46 +45,32 @@ namespace opts {
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
extern cl::opt<bool> NoThreads;
|
||||
|
||||
cl::opt<unsigned>
|
||||
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<unsigned> 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<double>
|
||||
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<double>
|
||||
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<unsigned>
|
||||
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<unsigned>
|
||||
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<unsigned> 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<unsigned> 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 {
|
||||
|
@ -35,12 +35,8 @@ static cl::opt<std::string> FrameOptFunctionNamesFile(
|
||||
"funcs-file-fop",
|
||||
cl::desc("file with list of functions to frame optimize"));
|
||||
|
||||
static cl::opt<bool>
|
||||
TimeFA("time-fa",
|
||||
cl::desc("time frame analysis steps"),
|
||||
cl::ReallyHidden,
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> TimeFA("time-fa", cl::desc("time frame analysis steps"),
|
||||
cl::ReallyHidden, cl::cat(BoltOptCategory));
|
||||
|
||||
bool shouldFrameOptimize(const llvm::bolt::BinaryFunction &Function) {
|
||||
if (Function.hasUnknownControlFlow())
|
||||
|
@ -43,13 +43,10 @@ FrameOptimization("frame-opt",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
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<bool> RemoveStores(
|
||||
"frame-opt-rm-stores", cl::init(FOP_NONE),
|
||||
cl::desc("apply additional analysis to remove stores (experimental)"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
|
@ -37,45 +37,30 @@ namespace opts {
|
||||
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
cl::opt<unsigned>
|
||||
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<unsigned> ITLBPageSize("itlb-page-size",
|
||||
cl::desc("The size of i-tlb cache page"),
|
||||
cl::init(4096), cl::ReallyHidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<unsigned>
|
||||
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<unsigned> ITLBEntries("itlb-entries",
|
||||
cl::desc("The number of entries in i-tlb cache"),
|
||||
cl::init(16), cl::ReallyHidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
ITLBDensity("itlb-density",
|
||||
cl::desc("The density of i-tlb cache"),
|
||||
cl::init(4096),
|
||||
cl::ReallyHidden,
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<unsigned> ITLBDensity("itlb-density",
|
||||
cl::desc("The density of i-tlb cache"),
|
||||
cl::init(4096), cl::ReallyHidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<double>
|
||||
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<double> 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<double>
|
||||
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<double> 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
|
||||
|
||||
|
@ -29,12 +29,9 @@ namespace opts {
|
||||
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
static cl::opt<bool>
|
||||
UseDFS("icf-dfs",
|
||||
cl::desc("use DFS ordering when using -icf option"),
|
||||
cl::ReallyHidden,
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> UseDFS("icf-dfs",
|
||||
cl::desc("use DFS ordering when using -icf option"),
|
||||
cl::ReallyHidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
TimeICF("time-icf",
|
||||
|
@ -44,7 +44,7 @@ static cl::opt<unsigned> 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<unsigned> ICPCallsRemainingPercentThreshold(
|
||||
"icp-calls-remaining-percent-threshold",
|
||||
@ -57,7 +57,7 @@ static cl::opt<unsigned> 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<unsigned> ICPMispredictThreshold(
|
||||
"indirect-call-promotion-mispredict-threshold",
|
||||
@ -71,7 +71,7 @@ static cl::opt<bool> 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<unsigned>
|
||||
ICPTopN("indirect-call-promotion-topn",
|
||||
|
@ -38,10 +38,9 @@ namespace opts {
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<std::string>
|
||||
ForceInlineFunctions("force-inline",
|
||||
@ -51,68 +50,46 @@ ForceInlineFunctions("force-inline",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
InlineAll("inline-all",
|
||||
cl::desc("inline all functions"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> InlineAll("inline-all", cl::desc("inline all functions"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<bool>
|
||||
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<bool> InlineIgnoreCFI(
|
||||
"inline-ignore-cfi",
|
||||
cl::desc(
|
||||
"inline functions with CFI programs (can break exception handling)"),
|
||||
cl::ReallyHidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
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<unsigned>
|
||||
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<bool>
|
||||
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<bool> 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<unsigned>
|
||||
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<unsigned> 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<bool>
|
||||
NoInline("no-inline",
|
||||
cl::desc("disable all inlining (overrides other inlining options)"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> 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,
|
||||
|
@ -23,12 +23,9 @@ extern cl::opt<unsigned> AlignFunctions;
|
||||
extern cl::opt<bool> UseOldText;
|
||||
extern cl::opt<bool> HotFunctionsAtEnd;
|
||||
|
||||
static cl::opt<bool>
|
||||
GroupStubs("group-stubs",
|
||||
cl::desc("share stubs across functions"),
|
||||
cl::init(true),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> GroupStubs("group-stubs",
|
||||
cl::desc("share stubs across functions"),
|
||||
cl::init(true), cl::cat(BoltOptCategory));
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
@ -30,31 +30,23 @@ extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
extern cl::opt<bool> TimeOpts;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> IterativeGuess(
|
||||
"iterative-guess",
|
||||
cl::desc("in non-LBR mode, guess edge counts using iterative technique"),
|
||||
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool> UseRArcs(
|
||||
"mcf-use-rarcs",
|
||||
cl::desc("in MCF, consider the possibility of cancelling flow to balance "
|
||||
"edges"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
|
@ -22,13 +22,9 @@ extern llvm::cl::OptionCategory BoltCategory;
|
||||
extern llvm::cl::opt<unsigned> Verbosity;
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
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 {
|
||||
|
@ -24,12 +24,9 @@ namespace opts {
|
||||
extern cl::opt<unsigned> Verbosity;
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
cl::opt<bool> AssumeABI(
|
||||
"assume-abi",
|
||||
cl::desc("assume the ABI is never violated"),
|
||||
cl::ZeroOrMore,
|
||||
cl::init(false),
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::opt<bool> AssumeABI("assume-abi",
|
||||
cl::desc("assume the ABI is never violated"),
|
||||
cl::cat(BoltOptCategory));
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
@ -26,14 +26,11 @@ namespace opts {
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
extern cl::opt<bool> UpdateDebugSections;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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 {
|
||||
|
@ -38,20 +38,12 @@ static cl::opt<unsigned> ColdThreshold(
|
||||
"samples). Default: 0 "),
|
||||
cl::init(0), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintClusters("print-clusters",
|
||||
cl::desc("print clusters"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> PrintClusters("print-clusters", cl::desc("print clusters"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<uint32_t>
|
||||
RandomSeed("bolt-seed",
|
||||
cl::desc("seed for randomization"),
|
||||
cl::init(42),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::opt<uint32_t> RandomSeed("bolt-seed", cl::desc("seed for randomization"),
|
||||
cl::init(42), cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
|
@ -30,11 +30,9 @@ extern cl::OptionCategory BoltOptCategory;
|
||||
extern cl::opt<JumpTableSupportLevel> JumpTables;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<std::string>
|
||||
ReorderData("reorder-data",
|
||||
@ -63,18 +61,14 @@ ReorderAlgorithm("reorder-data-algo",
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
ReorderDataMaxSymbols("reorder-data-max-symbols",
|
||||
cl::desc("maximum number of symbols to reorder"),
|
||||
cl::ZeroOrMore,
|
||||
cl::init(std::numeric_limits<unsigned>::max()),
|
||||
cl::cat(BoltOptCategory));
|
||||
ReorderDataMaxSymbols("reorder-data-max-symbols",
|
||||
cl::desc("maximum number of symbols to reorder"),
|
||||
cl::init(std::numeric_limits<unsigned>::max()),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
ReorderDataMaxBytes("reorder-data-max-bytes",
|
||||
cl::desc("maximum number of bytes to reorder"),
|
||||
cl::ZeroOrMore,
|
||||
cl::init(std::numeric_limits<unsigned>::max()),
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<unsigned> ReorderDataMaxBytes(
|
||||
"reorder-data-max-bytes", cl::desc("maximum number of bytes to reorder"),
|
||||
cl::init(std::numeric_limits<unsigned>::max()), cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::list<std::string>
|
||||
ReorderSymbols("reorder-symbols",
|
||||
@ -92,13 +86,10 @@ SkipSymbols("reorder-skip-symbols",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
ReorderInplace("reorder-data-inplace",
|
||||
cl::desc("reorder data sections in place"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> ReorderInplace("reorder-data-inplace",
|
||||
cl::desc("reorder data sections in place"),
|
||||
|
||||
cl::cat(BoltOptCategory));
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
@ -55,12 +55,10 @@ ReorderFunctions("reorder-functions",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<std::string>
|
||||
FunctionOrderFile("function-order",
|
||||
@ -81,11 +79,9 @@ LinkSectionsFile("generate-link-sections",
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
CgFromPerfData("cg-from-perf-data",
|
||||
@ -95,12 +91,10 @@ CgFromPerfData("cg-from-perf-data",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> CgIgnoreRecursiveCalls(
|
||||
"cg-ignore-recursive-calls",
|
||||
cl::desc("ignore recursive calls when constructing the call graph"),
|
||||
cl::init(true), cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
CgUseSplitHotSize("cg-use-split-hot-size",
|
||||
|
@ -32,12 +32,9 @@ namespace opts {
|
||||
|
||||
extern cl::OptionCategory BoltCategory;
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
InsertRetpolines("insert-retpolines",
|
||||
cl::desc("run retpoline insertion pass"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
llvm::cl::opt<bool> InsertRetpolines("insert-retpolines",
|
||||
cl::desc("run retpoline insertion pass"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
RetpolineLfence("retpoline-lfence",
|
||||
|
@ -29,21 +29,18 @@ extern cl::OptionCategory BoltOptCategory;
|
||||
extern cl::opt<bool> SplitEH;
|
||||
extern cl::opt<unsigned> ExecutionCountThreshold;
|
||||
|
||||
static cl::opt<bool>
|
||||
AggressiveSplitting("split-all-cold",
|
||||
cl::desc("outline as many cold basic blocks as possible"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> AggressiveSplitting(
|
||||
"split-all-cold", cl::desc("outline as many cold basic blocks as possible"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
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<unsigned> 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::SplittingType>
|
||||
SplitFunctions("split-functions",
|
||||
@ -61,16 +58,13 @@ SplitFunctions("split-functions",
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
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<unsigned> 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)
|
||||
|
@ -43,7 +43,7 @@ static cl::opt<unsigned>
|
||||
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<unsigned> TailDuplicationMaximumDuplication(
|
||||
@ -56,7 +56,7 @@ static cl::opt<unsigned> 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<bool> TailDuplicationConstCopyPropagation(
|
||||
"tail-duplication-const-copy-propagation",
|
||||
|
@ -21,12 +21,9 @@ namespace opts {
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
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 {
|
||||
|
@ -40,11 +40,9 @@ using namespace bolt;
|
||||
namespace opts {
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
FilterMemProfile("filter-mem-profile",
|
||||
@ -66,12 +64,10 @@ IgnoreBuildID("ignore-build-id",
|
||||
cl::init(false),
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
IgnoreInterruptLBR("ignore-interrupt-lbr",
|
||||
cl::desc("ignore kernel interrupt LBR that happens asynchronously"),
|
||||
cl::init(true),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(AggregatorCategory));
|
||||
static cl::opt<bool> IgnoreInterruptLBR(
|
||||
"ignore-interrupt-lbr",
|
||||
cl::desc("ignore kernel interrupt LBR that happens asynchronously"),
|
||||
cl::init(true), cl::cat(AggregatorCategory));
|
||||
|
||||
static cl::opt<unsigned long long>
|
||||
MaxSamples("max-samples",
|
||||
@ -81,12 +77,9 @@ MaxSamples("max-samples",
|
||||
cl::Hidden,
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> ReadPreAggregated(
|
||||
"pa", cl::desc("skip perf and read data from a pre-aggregated file format"),
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
TimeAggregator("time-aggr",
|
||||
@ -96,18 +89,13 @@ TimeAggregator("time-aggr",
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
WriteAutoFDOData("autofdo",
|
||||
cl::desc("generate autofdo textual data instead of bolt data"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(AggregatorCategory));
|
||||
static cl::opt<bool> WriteAutoFDOData(
|
||||
"autofdo", cl::desc("generate autofdo textual data instead of bolt data"),
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
|
@ -22,13 +22,9 @@ extern cl::opt<unsigned> Verbosity;
|
||||
extern cl::OptionCategory BoltOptCategory;
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
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 {
|
||||
|
@ -59,16 +59,14 @@ static cl::opt<bool>
|
||||
cl::desc("eliminate unreachable code"), cl::init(true),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
ICF("icf",
|
||||
cl::desc("fold functions with identical code"),
|
||||
cl::ZeroOrMore, cl::cat(BoltOptCategory));
|
||||
cl::opt<bool> ICF("icf", cl::desc("fold functions with identical code"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<bool> 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<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
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<bool> PrintJTFootprintReduction(
|
||||
"print-after-jt-footprint-reduction",
|
||||
cl::desc("print function after jt-footprint-reduction pass"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintJTFootprintReduction("print-after-jt-footprint-reduction",
|
||||
cl::desc("print function after jt-footprint-reduction pass"),
|
||||
cl::ZeroOrMore, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool> PrintOptimizeBodyless(
|
||||
"print-optimize-bodyless",
|
||||
cl::desc("print functions after bodyless optimization"), cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
PrintProfileStats("print-profile-stats",
|
||||
cl::desc("print profile quality/bias analysis"),
|
||||
cl::ZeroOrMore, cl::init(false), cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
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<bool> PrintRetpolineInsertion(
|
||||
"print-retpoline-insertion",
|
||||
cl::desc("print functions after retpoline insertion pass"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintSCTC("print-sctc",
|
||||
cl::desc("print functions after conditional tail call simplification"),
|
||||
cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> PrintSCTC(
|
||||
"print-sctc",
|
||||
cl::desc("print functions after conditional tail call simplification"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool> PrintSimplifyROLoads(
|
||||
"print-simplify-rodata-loads",
|
||||
cl::desc("print functions after simplification of RO data loads"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool>
|
||||
PrintStoke("print-stoke", cl::desc("print functions after stoke analysis"),
|
||||
@ -188,9 +183,9 @@ static cl::opt<bool> PrintVeneerElimination(
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> RegReAssign(
|
||||
"reg-reassign",
|
||||
@ -203,11 +198,11 @@ static cl::opt<bool> SimplifyConditionalTailCalls(
|
||||
cl::desc("simplify conditional tail calls by removing unnecessary jumps"),
|
||||
cl::init(true), cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> 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<std::string>
|
||||
SpecializeMemcpy1("memcpy1-spec",
|
||||
@ -233,14 +228,14 @@ static cl::opt<bool> VerifyCFG("verify-cfg",
|
||||
cl::desc("verify the CFG after every pass"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
ThreeWayBranchFlag("three-way-branch",
|
||||
cl::desc("reorder three way branches"),
|
||||
cl::ZeroOrMore, cl::ReallyHidden, cl::cat(BoltOptCategory));
|
||||
static cl::opt<bool> ThreeWayBranchFlag("three-way-branch",
|
||||
cl::desc("reorder three way branches"),
|
||||
cl::ReallyHidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool> CMOVConversionFlag("cmov-conversion",
|
||||
cl::desc("fold jcc+mov into cmov"),
|
||||
cl::ZeroOrMore, cl::ReallyHidden,
|
||||
cl::ReallyHidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
@ -28,76 +28,58 @@ extern cl::OptionCategory BoltDiffCategory;
|
||||
extern cl::opt<bool> NeverPrint;
|
||||
extern cl::opt<bool> ICF;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> IgnoreLTOSuffix(
|
||||
"ignore-lto-suffix",
|
||||
cl::desc("ignore lto_priv or const suffixes when matching functions"),
|
||||
cl::init(true), cl::cat(BoltDiffCategory));
|
||||
|
||||
static cl::opt<bool> 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<bool> 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<bool> PrintDiffCFG(
|
||||
"print-diff-cfg",
|
||||
cl::desc("print the CFG of important functions that changed in "
|
||||
"binary 2"),
|
||||
cl::cat(BoltDiffCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
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<bool> 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<bool>
|
||||
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<bool> 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<bool>
|
||||
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<unsigned> 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<bool>
|
||||
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<bool>
|
||||
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<unsigned>
|
||||
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<bool>
|
||||
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<bool> 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
|
||||
|
||||
|
@ -102,12 +102,11 @@ extern cl::OptionCategory BoltCategory;
|
||||
extern cl::opt<unsigned> Verbosity;
|
||||
extern cl::opt<std::string> OutputFilename;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> KeepARanges(
|
||||
"keep-aranges",
|
||||
cl::desc(
|
||||
"keep or generate .debug_aranges section if .gdb_index is written"),
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
DeterministicDebugInfo("deterministic-debuginfo",
|
||||
|
@ -80,20 +80,17 @@ extern cl::list<std::string> ReorderData;
|
||||
extern cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions;
|
||||
extern cl::opt<bool> TimeBuild;
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> ForceToDataRelocations(
|
||||
"force-data-relocations",
|
||||
cl::desc("force relocations to data sections to always be processed"),
|
||||
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<std::string>
|
||||
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<bool>
|
||||
AllowStripped("allow-stripped",
|
||||
@ -105,7 +102,7 @@ cl::opt<bool> 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<std::string>
|
||||
ForceFunctionNames("funcs",
|
||||
@ -137,12 +134,8 @@ KeepTmp("keep-tmp",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
Lite("lite",
|
||||
cl::desc("skip processing of cold functions"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> Lite("lite", cl::desc("skip processing of cold functions"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
LiteThresholdPct("lite-threshold-pct",
|
||||
@ -155,72 +148,49 @@ LiteThresholdPct("lite-threshold-pct",
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<unsigned>
|
||||
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<unsigned> 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<unsigned>
|
||||
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<unsigned>
|
||||
MaxDataRelocations("max-data-relocations",
|
||||
cl::desc("maximum number of data relocations to process"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
static cl::opt<unsigned> MaxDataRelocations(
|
||||
"max-data-relocations",
|
||||
cl::desc("maximum number of data relocations to process"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
PrintAll("print-all",
|
||||
cl::desc("print functions after each stage"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> PrintAll("print-all",
|
||||
cl::desc("print functions after each stage"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
PrintCFG("print-cfg",
|
||||
cl::desc("print functions after CFG construction"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> PrintCFG("print-cfg",
|
||||
cl::desc("print functions after CFG construction"),
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool> 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<bool>
|
||||
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<bool> PrintSections;
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintLoopInfo("print-loops",
|
||||
cl::desc("print loop related information"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
static cl::opt<bool> PrintLoopInfo("print-loops",
|
||||
cl::desc("print loop related information"),
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
PrintSDTMarkers("print-sdt",
|
||||
cl::desc("print all SDT markers"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
static cl::opt<bool> 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<PrintPseudoProbesOptions> PrintPseudoProbes(
|
||||
clEnumValN(PPP_All, "all", "enable all debugging printout")),
|
||||
cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<cl::boolOrDefault>
|
||||
RelocationMode("relocs",
|
||||
cl::desc("use relocations in the binary (default=autodetect)"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
static cl::opt<cl::boolOrDefault> RelocationMode(
|
||||
"relocs", cl::desc("use relocations in the binary (default=autodetect)"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<std::string>
|
||||
SaveProfile("w",
|
||||
@ -286,11 +254,9 @@ UseGnuStack("use-gnu-stack",
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool>
|
||||
SequentialDisassembly("sequential-disassembly",
|
||||
@ -298,13 +264,9 @@ SequentialDisassembly("sequential-disassembly",
|
||||
cl::init(false),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
static cl::opt<bool>
|
||||
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<bool> WriteBoltInfoSection(
|
||||
"bolt-info", cl::desc("write bolt info section in the output binary"),
|
||||
cl::init(true), cl::Hidden, cl::cat(BoltOutputCategory));
|
||||
|
||||
} // namespace opts
|
||||
|
||||
|
@ -31,7 +31,7 @@ cl::opt<bool>
|
||||
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<std::string> RuntimeHugifyLib(
|
||||
"runtime-hugify-lib",
|
||||
|
@ -27,7 +27,7 @@ namespace opts {
|
||||
cl::opt<std::string> 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<bool> InstrumentationFileAppendPID;
|
||||
extern cl::opt<bool> ConservativeInstrumentation;
|
||||
|
@ -44,7 +44,7 @@ extern cl::OptionCategory BoltOptCategory;
|
||||
static cl::opt<bool> 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
|
||||
|
||||
|
@ -40,12 +40,9 @@ cl::OptionCategory AggregatorCategory("Data aggregation options");
|
||||
cl::OptionCategory BoltInstrCategory("BOLT instrumentation options");
|
||||
cl::OptionCategory HeatmapCategory("Heatmap options");
|
||||
|
||||
cl::opt<unsigned>
|
||||
AlignText("align-text",
|
||||
cl::desc("alignment of .text section"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<unsigned> AlignText("align-text",
|
||||
cl::desc("alignment of .text section"), cl::Hidden,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<unsigned> AlignFunctions(
|
||||
"align-functions",
|
||||
@ -103,19 +100,15 @@ cl::opt<unsigned long long> HeatmapMinAddress(
|
||||
cl::desc("minimum address considered valid for heatmap (default 0)"),
|
||||
cl::Optional, cl::cat(HeatmapCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
HotData("hot-data",
|
||||
cl::desc("hot data symbols support (relocation mode)"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> HotData("hot-data",
|
||||
cl::desc("hot data symbols support (relocation mode)"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
HotFunctionsAtEnd(
|
||||
"hot-functions-at-end",
|
||||
cl::desc(
|
||||
"if reorder-functions is used, order functions putting hottest last"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> HotFunctionsAtEnd(
|
||||
"hot-functions-at-end",
|
||||
cl::desc(
|
||||
"if reorder-functions is used, order functions putting hottest last"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool> HotText(
|
||||
"hot-text",
|
||||
@ -128,7 +121,7 @@ cl::opt<bool> HotText(
|
||||
cl::opt<bool>
|
||||
Instrument("instrument",
|
||||
cl::desc("instrument code to generate accurate profile data"),
|
||||
cl::ZeroOrMore, cl::cat(BoltOptCategory));
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<std::string>
|
||||
OutputFilename("o",
|
||||
@ -149,52 +142,37 @@ PerfDataA("p",
|
||||
cl::aliasopt(PerfData),
|
||||
cl::cat(AggregatorCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
PrintCacheMetrics("print-cache-metrics",
|
||||
cl::desc("calculate and print various metrics for instruction cache"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::opt<bool> PrintCacheMetrics(
|
||||
"print-cache-metrics",
|
||||
cl::desc("calculate and print various metrics for instruction cache"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<bool> PrintSections("print-sections",
|
||||
cl::desc("print all registered sections"),
|
||||
cl::Hidden, cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool> SplitEH("split-eh", cl::desc("split C++ exception handling code"),
|
||||
cl::Hidden, cl::cat(BoltOptCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
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<bool>
|
||||
SplitEH("split-eh",
|
||||
cl::desc("split C++ exception handling code"),
|
||||
cl::ZeroOrMore,
|
||||
cl::Hidden,
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
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<bool> TimeOpts("time-opts",
|
||||
cl::desc("print time spent in each optimization"),
|
||||
cl::cat(BoltOptCategory));
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
TimeOpts("time-opts",
|
||||
cl::desc("print time spent in each optimization"),
|
||||
cl::init(false),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltOptCategory));
|
||||
cl::opt<bool> UseOldText(
|
||||
"use-old-text",
|
||||
cl::desc("re-use space in old .text if possible (relocation mode)"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
UseOldText("use-old-text",
|
||||
cl::desc("re-use space in old .text if possible (relocation mode)"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<bool>
|
||||
UpdateDebugSections("update-debug-sections",
|
||||
cl::desc("update DWARF debug sections of the executable"),
|
||||
cl::ZeroOrMore,
|
||||
cl::cat(BoltCategory));
|
||||
cl::opt<bool> UpdateDebugSections(
|
||||
"update-debug-sections",
|
||||
cl::desc("update DWARF debug sections of the executable"),
|
||||
cl::cat(BoltCategory));
|
||||
|
||||
cl::opt<unsigned>
|
||||
Verbosity("v",
|
||||
|
Loading…
Reference in New Issue
Block a user