[llvm] [MachineOutliner] Add profile guided outlining (PR #154437)
    Kyungwoo Lee via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Aug 22 09:53:21 PDT 2025
    
    
  
================
@@ -134,12 +134,20 @@ static cl::opt<cl::boolOrDefault> DebugifyCheckAndStripAll(
 static cl::opt<RunOutliner> EnableMachineOutliner(
     "enable-machine-outliner", cl::desc("Enable the machine outliner"),
     cl::Hidden, cl::ValueOptional, cl::init(RunOutliner::TargetDefault),
-    cl::values(clEnumValN(RunOutliner::AlwaysOutline, "always",
-                          "Run on all functions guaranteed to be beneficial"),
-               clEnumValN(RunOutliner::NeverOutline, "never",
-                          "Disable all outlining"),
-               // Sentinel value for unspecified option.
-               clEnumValN(RunOutliner::AlwaysOutline, "", "")));
+    cl::values(
+        clEnumValN(RunOutliner::AlwaysOutline, "always",
+                   "Run on all functions guaranteed to be beneficial"),
+        clEnumValN(RunOutliner::OptimisticProfileGuidedOutliner,
+                   "optimistic-profile-guided-outliner",
----------------
kyulee-com wrote:
The flag names seem too long compared to others. A single word seems not sufficient, though.
What about `pgo-optimistic` or `pgo-conservative`? `-outliner` seems redundant as we're setting an outliner value here.
https://github.com/llvm/llvm-project/pull/154437
    
    
More information about the llvm-commits
mailing list