llvm-project
llvm-project copied to clipboard
[LLVM][LLD][LTO] Profile Guided Layout (--call-graph-profile-sort) does not work with FullLTO
The CGProfilePass is not run as part of compiling the LTO object file with FullLTO, as a consequence the .llvm.call-graph-profile section is not emitted into the LTO object file and profile guided layout (--call-graph-profile-sort) does not occur.
Profile guided layout does currently work with both ThinLTO and with normal compilation as the CGProfilePass is run appropriately for both.
Review for potential fix: https://reviews.llvm.org/D128452
Try avoiding uncommon abbreviations like PGL, FLTO, and TLTO :)