diff options
| author | Haohai Wen <haohai.wen@intel.com> | 2025-01-05 10:38:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-05 10:38:14 +0800 |
| commit | 2d9d291da0fb94c05b31de0b08ccb881dbead798 (patch) | |
| tree | 83de80916e50ea0b525967b0072ce410c2c44cba /lld/COFF/Driver.cpp | |
| parent | 36dd421355791c9c9f6552f8730b36b8953ce5db (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.cpp | 6 |
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. |
