[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:13:36 PDT 2022


Amir updated this revision to Diff 439229.
Amir added a comment.

Alias for icp


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128375/new/

https://reviews.llvm.org/D128375

Files:
  bolt/lib/Passes/IndirectCallPromotion.cpp


Index: bolt/lib/Passes/IndirectCallPromotion.cpp
===================================================================
--- bolt/lib/Passes/IndirectCallPromotion.cpp
+++ bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -33,6 +33,10 @@
 extern cl::opt<unsigned> Verbosity;
 extern cl::opt<unsigned> ExecutionCountThreshold;
 
+static cl::alias ICPShort("icp",
+                          cl::desc("Alias for --indirect-call-promotion"),
+                          cl::aliasopt(ICP));
+
 static cl::opt<unsigned> ICPJTRemainingPercentThreshold(
     "icp-jt-remaining-percent-threshold",
     cl::desc("The percentage threshold against remaining unpromoted indirect "
@@ -65,6 +69,11 @@
              "indirect call"),
     cl::init(0), cl::cat(BoltOptCategory));
 
+static cl::alias ICPMispredictThresholdShort(
+    "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 +82,44 @@
              "by this heuristic"),
     cl::cat(BoltOptCategory));
 
+static cl::alias ICPUseMispredictsShort(
+    "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
+    ICPTopNShort("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 ICPCallsTopNShort(
+    "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 ICPJumpTablesTopNShort(
+    "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 +149,11 @@
         "for jump tables, optimize indirect jmp targets instead of indices"),
     cl::Hidden, cl::cat(BoltOptCategory));
 
+static cl::alias
+    ICPJumpTablesByTargetShort("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));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128375.439229.patch
Type: text/x-patch
Size: 3347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220623/a63e9dfd/attachment.bin>


More information about the llvm-commits mailing list