summaryrefslogtreecommitdiff
path: root/lld/COFF/Driver.cpp
diff options
context:
space:
mode:
authorHaohai Wen <haohai.wen@intel.com>2025-01-05 10:38:14 +0800
committerGitHub <noreply@github.com>2025-01-05 10:38:14 +0800
commit2d9d291da0fb94c05b31de0b08ccb881dbead798 (patch)
tree83de80916e50ea0b525967b0072ce410c2c44cba /lld/COFF/Driver.cpp
parent36dd421355791c9c9f6552f8730b36b8953ce5db (diff)
[LLD] Do not combine cg_profile from obj and ordering file (#121325)
cg_profile in object is from CGProfilePass and it is often inaccurate. While call-graph-ordering-file is provided by user. It is weird to aggregate them together especially when call-graph-ordering-file is accurate enough.
Diffstat (limited to 'lld/COFF/Driver.cpp')
-rw-r--r--lld/COFF/Driver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 83d3f5d4cf99..791382fd9bdd 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2878,10 +2878,10 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Handle /call-graph-ordering-file and /call-graph-profile-sort (default on).
if (config->callGraphProfileSort) {
llvm::TimeTraceScope timeScope("Call graph");
- if (auto *arg = args.getLastArg(OPT_call_graph_ordering_file)) {
+ if (auto *arg = args.getLastArg(OPT_call_graph_ordering_file))
parseCallGraphFile(arg->getValue());
- }
- readCallGraphsFromObjectFiles(ctx);
+ else
+ readCallGraphsFromObjectFiles(ctx);
}
// Handle /print-symbol-order.