[PATCH] D128452: [LLVM][LTO][LLD] Enable Profile Guided Layout (--call-graph-profile-sort) for FullLTO
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 14:59:11 PDT 2022
bd1976llvm marked 2 inline comments as done.
bd1976llvm added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1274
- if (PTO.CallGraphProfile)
+ if (PTO.CallGraphProfile && !LTOPreLink)
MPM.addPass(CGProfilePass());
----------------
MaskRay wrote:
> 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.
Seems like a reasonable improvement. It seems to work with the programs I tried it on locally. Thanks!
================
Comment at: llvm/test/Other/new-pm-defaults.ll:12
; RUN: -passes='default<O1>' -S %s 2>&1 \
-; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-DEFAULT,CHECK-O1,%llvmcheckext
+; RUN: | FileCheck %s --check-prefixes=CHECK-O,CHECK-CGPP,CHECK-DEFAULT,CHECK-O1,%llvmcheckext
; RUN: opt -disable-verify -verify-cfg-preserved=0 -eagerly-invalidate-analyses=0 -debug-pass-manager \
----------------
MaskRay wrote:
> CHECK-CGPP isn't clear. Clarify it. Possibly add a comment explaining what it does.
I noticed that I can just use CHECK-DEFAULT (as is used for the similar "RelLookupTableConverterPass" pass) :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128452/new/
https://reviews.llvm.org/D128452
More information about the llvm-commits
mailing list