[lld] [lld][InstrProf] Profile guided function order (PR #96268)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 19:24:09 PDT 2024


================
@@ -147,6 +147,14 @@ def cs_profile_path: Joined<["--"], "cs-profile-path=">,
 defm pgo_warn_mismatch: BB<"pgo-warn-mismatch",
   "turn on warnings about profile cfg mismatch (default)",
   "turn off warnings about profile cfg mismatch">, Group<grp_lld>;
+def profile_guided_function_order: Joined<["--"], "profile-guided-function-order=">,
+    MetaVarName<"<profile>">, 
+    HelpText<"Read traces from <profile> to order functions to improve startup time">,
+    Group<grp_lld>;
----------------
WenleiHe wrote:

The name can be confusing given we have `--symbol-ordering-file` and call graph sort using `.cgprofile` section already. 

`--profile-guided-function-order` looks very similar by name, but it's actually very specific for balanced partition layout. 

Also the name suggests the input is an order file, but it's taking an actual profile. 


https://github.com/llvm/llvm-project/pull/96268


More information about the llvm-commits mailing list