[PATCH] D128375: [BOLT][NFC] Add aliases for ICP flags
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 18:52:02 PDT 2022
Amir updated this revision to Diff 439237.
Amir added a comment.
Short -> Alias
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128375/new/
https://reviews.llvm.org/D128375
Files:
bolt/lib/Core/BinaryFunctionProfile.cpp
bolt/lib/Passes/IndirectCallPromotion.cpp
Index: bolt/lib/Passes/IndirectCallPromotion.cpp
===================================================================
--- bolt/lib/Passes/IndirectCallPromotion.cpp
+++ bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -65,6 +65,11 @@
"indirect call"),
cl::init(0), cl::cat(BoltOptCategory));
+static cl::alias ICPMispredictThresholdAlias(
+ "icp-mp-threshold",
+ cl::desc("alias for --indirect-call-promotion-mispredict-threshold"),
+ cl::aliasopt(ICPMispredictThreshold));
+
static cl::opt<bool> ICPUseMispredicts(
"indirect-call-promotion-use-mispredicts",
cl::desc("use misprediction frequency for determining whether or not ICP "
@@ -73,24 +78,44 @@
"by this heuristic"),
cl::cat(BoltOptCategory));
+static cl::alias ICPUseMispredictsAlias(
+ "icp-use-mp",
+ cl::desc("alias for --indirect-call-promotion-use-mispredicts"),
+ cl::aliasopt(ICPUseMispredicts));
+
static cl::opt<unsigned>
ICPTopN("indirect-call-promotion-topn",
cl::desc("limit number of targets to consider when doing indirect "
"call promotion. 0 = no limit"),
cl::init(3), cl::cat(BoltOptCategory));
+static cl::alias
+ ICPTopNAlias("icp-topn",
+ cl::desc("alias for --indirect-call-promotion-topn"),
+ cl::aliasopt(ICPTopN));
+
static cl::opt<unsigned> ICPCallsTopN(
"indirect-call-promotion-calls-topn",
cl::desc("limit number of targets to consider when doing indirect "
"call promotion on calls. 0 = no limit"),
cl::init(0), cl::cat(BoltOptCategory));
+static cl::alias ICPCallsTopNAlias(
+ "icp-calls-topn",
+ cl::desc("alias for --indirect-call-promotion-calls-topn"),
+ cl::aliasopt(ICPCallsTopN));
+
static cl::opt<unsigned> ICPJumpTablesTopN(
"indirect-call-promotion-jump-tables-topn",
cl::desc("limit number of targets to consider when doing indirect "
"call promotion on jump tables. 0 = no limit"),
cl::init(0), cl::cat(BoltOptCategory));
+static cl::alias ICPJumpTablesTopNAlias(
+ "icp-jt-topn",
+ cl::desc("alias for --indirect-call-promotion-jump-tables-topn"),
+ cl::aliasopt(ICPJumpTablesTopN));
+
static cl::opt<bool> EliminateLoads(
"icp-eliminate-loads",
cl::desc("enable load elimination using memory profiling data when "
@@ -120,6 +145,11 @@
"for jump tables, optimize indirect jmp targets instead of indices"),
cl::Hidden, cl::cat(BoltOptCategory));
+static cl::alias
+ ICPJumpTablesByTargetAlias("icp-jt-targets",
+ cl::desc("alias for --icp-jump-tables-targets"),
+ cl::aliasopt(ICPJumpTablesByTarget));
+
static cl::opt<bool> ICPPeelForInline(
"icp-inline", cl::desc("only promote call targets eligible for inlining"),
cl::Hidden, cl::cat(BoltOptCategory));
Index: bolt/lib/Core/BinaryFunctionProfile.cpp
===================================================================
--- bolt/lib/Core/BinaryFunctionProfile.cpp
+++ bolt/lib/Core/BinaryFunctionProfile.cpp
@@ -38,6 +38,10 @@
clEnumValN(ICP_ALL, "all", "perform ICP on calls and jump tables")),
cl::ZeroOrMore, cl::cat(BoltOptCategory));
+static cl::alias ICPAlias("icp",
+ cl::desc("Alias for --indirect-call-promotion"),
+ cl::aliasopt(ICP));
+
extern cl::opt<JumpTableSupportLevel> JumpTables;
static cl::opt<bool> FixFuncCounts(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128375.439237.patch
Type: text/x-patch
Size: 3497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220623/1d86d5ad/attachment.bin>
More information about the llvm-commits
mailing list