[PATCH] D112164: [lld-macho] Port CallGraphSort from COFF/ELF
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 13:09:34 PST 2022
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
Cool.
================
Comment at: lld/MachO/Driver.cpp:1401
parseOrderFile(orderFile);
+ config->callGraphProfileSort = false;
+ }
----------------
should we warn if there's both an explicit `--call-graph-profile-sort` flag and an `-order_file` flag? Or maybe later when we know that there's call graph info in the .o file but also an order file?
(…or are you planning on adding support for both flags at the same time in a follow-up?)
================
Comment at: lld/MachO/InputFiles.cpp:307
} else if (segname == segment_names::llvm) {
+ if (name == "__cg_profile" && config->callGraphProfileSort) {
+ BinaryStreamReader reader(data, support::little);
----------------
Should this have a TimeTrace too?
================
Comment at: lld/MachO/Options.td:77
+def call_graph_profile_sort: Flag<["--"], "call-graph-profile-sort">,
+ HelpText<"Reorder sections with call graph profile (default: true)">,
+ Group<grp_lld>;
----------------
nit: Put just `(default)` here, and omit it from the line below. That's consistent with the rest of the help texts.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112164/new/
https://reviews.llvm.org/D112164
More information about the llvm-commits
mailing list