[PATCH] D128452: [PGL][LTO] Make PGL work with FLTO (PR #56185)

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 09:39:29 PDT 2022


bd1976llvm created this revision.
bd1976llvm added reviewers: MaskRay, Bigcheese, pcc, hans, chandlerc, asbirlea, nikic.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, inglorion.
Herald added a project: All.
bd1976llvm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The CGProfilePass needs to be run late, after FLTO, in order to populate the compiled LTO object file with the PGL section, currently, it is being run during the initial compilation stage (LTO-prelink) to produce the bitcode files to be consumed by the linker.

TLTO is not affected as the passes are added (correctly) via a different path

Adjust the passes so that the PGL section is produced correctly for FLTO.

https://github.com/llvm/llvm-project/issues/56185


https://reviews.llvm.org/D128452

Files:
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128452.439434.patch
Type: text/x-patch
Size: 10752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220623/0fc51d35/attachment.bin>


More information about the llvm-commits mailing list