[PATCH] D128452: [PGL][LTO] Make PGL work with FLTO (PR #56185)
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 14:22:49 PDT 2022
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Please expand uncommon abbreviations: PGL, FLTO, and TLTO.
> TLTO is not affected as the passes are added (correctly) via a different path
Be more precise about why ThinLTO is unaffected: buildModuleOptimizationPipeline called by it runs CGProfilePass.
================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1274
- if (PTO.CallGraphProfile)
+ if (PTO.CallGraphProfile && !LTOPreLink)
MPM.addPass(CGProfilePass());
----------------
Perhaps move after GlobalDCEPass/ConstantMergePass similar to buildLTODefaultPipeline.
GlobalDCEPass may discard some functions and these functions don't need to run CGProfilePass. Though the speed-up is almost assuredly negligible.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128452/new/
https://reviews.llvm.org/D128452
More information about the llvm-commits
mailing list