aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2021-08-18 16:59:02 -0700
committerRong Xu <xur@google.com>2021-08-18 18:37:35 -0700
commit5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4 (patch)
treed4d0b1f29de6c82b70765774da2542c3f37c76e4 /llvm/lib/LTO/LTOBackend.cpp
parentc777e51468f5d44ad4600344683ecf9b46aa2b0f (diff)
downloadllvm-5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4.zip
llvm-5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4.tar.gz
llvm-5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4.tar.bz2
[SampleFDO] Flow Sensitive Sample FDO (FSAFDO) profile loader
This patch implements Flow Sensitive Sample FDO (FSAFDO) profile loader. We have two profile loaders for FS profile, one before RegAlloc and one before BlockPlacement. To enable it, when -fprofile-sample-use=<profile> is specified, add "-enable-fs-discriminator=true \ -disable-ra-fsprofile-loader=false \ -disable-layout-fsprofile-loader=false" to turn on the FS profile loaders. Differential Revision: https://reviews.llvm.org/D107878
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 6563af0..73a48a7 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -230,6 +230,8 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
PGOOpt = PGOOptions("", "", "", PGOOptions::NoAction,
PGOOptions::NoCSAction, true);
}
+ if (TM)
+ TM->setPGOOption(PGOOpt);
LoopAnalysisManager LAM;
FunctionAnalysisManager FAM;