[lld] [lld][ELF] Extend profile guided function ordering to ELF binaries (PR #117514)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 11:23:47 PST 2024


================
@@ -141,6 +141,20 @@ def call_graph_profile_sort: JJ<"call-graph-profile-sort=">,
 def : FF<"no-call-graph-profile-sort">, Alias<call_graph_profile_sort>, AliasArgs<["none"]>,
   Flags<[HelpHidden]>;
 
+defm irpgo_profile_sort: Eq<"irpgo-profile-sort",
----------------
mysterymath wrote:

On the embedded side, we've discussed consuming profiles for an alternative goal: automatically placing hotter sections in better regions of memory.

Would it be possible to separate out the flag that provides the profile, say, `--irpgo_profile`, from a flag that enables sorting for startup time, say, `--startup-sort`? There's already a small family of sort concerns present in this patch, and that organization would support adding the embedded one in-kind once we iron out the details.

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


More information about the llvm-commits mailing list