[PATCH] D112164: [lld-macho] Port CallGraphSort from COFF/ELF
Leonard Grey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 11:12:20 PDT 2021
lgrey created this revision.
lgrey added a reviewer: thakis.
lgrey added a project: lld-macho.
Herald added subscribers: dang, mgorny.
Herald added a reviewer: gkm.
Herald added a reviewer: lld-macho.
lgrey requested review of this revision.
Herald added a project: LLVM.
Depends on D112160 <https://reviews.llvm.org/D112160>
This adds the new options `--call-graph-profile-sort` (default), `--no-call-graph-profile-sort` and `--print-symbol-order=`. If call graph profile sorting is enabled, reads __LLVM,__cg_profile sections from object files and uses the resulting graph to put callees and callers close to each other in the final binary via the C3 clustering heuristic.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112164
Files:
lld/MachO/CMakeLists.txt
lld/MachO/CallGraphSort.cpp
lld/MachO/CallGraphSort.h
lld/MachO/Config.h
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/InputFiles.h
lld/MachO/InputSection.h
lld/MachO/Options.td
lld/MachO/Writer.cpp
lld/test/MachO/cgprofile-icf.s
lld/test/MachO/cgprofile-obj.s
lld/test/MachO/cgprofile-print.s
llvm/utils/gn/secondary/lld/MachO/BUILD.gn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112164.381029.patch
Type: text/x-patch
Size: 20580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211020/4e7b7e9b/attachment-0001.bin>
More information about the llvm-commits
mailing list