[lld] [lld][InstrProf] Profile guided function order (PR #96268)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 12:17:44 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>;
----------------
ellishg wrote:
I like `--irpgo-profile-sort` because it aligns better with `--call-graph-profile-sort`. Thanks for the suggestion! In the future we may order data sections to improve startup, so `function` is not in the flag. When that happens, we may need to add another flag like `-irpgo-profile-sort-type={function,data,both}`. For now I'll leave this out.
https://github.com/llvm/llvm-project/pull/96268
More information about the llvm-commits
mailing list