summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SampleProfile.cpp
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-06-29 23:33:05 +0000
committerDehao Chen <dehao@google.com>2017-06-29 23:33:05 +0000
commit2f31d0d86e924c95b4b4ff3d2c7b165204ebaa9a (patch)
treef7f96182ee8bff2695964cbbcd98f9c44b3b5fc3 /llvm/lib/Transforms/IPO/SampleProfile.cpp
parent56f481b78e4f3abee9d51e892d9b7618d58f7085 (diff)
downloadbcm5719-llvm-2f31d0d86e924c95b4b4ff3d2c7b165204ebaa9a.tar.gz
bcm5719-llvm-2f31d0d86e924c95b4b4ff3d2c7b165204ebaa9a.zip
Hook the sample PGO machinery in the new PM
Summary: This patch hooks up SampleProfileLoaderPass with the new PM. Reviewers: chandlerc, davidxl, davide, tejohnson Reviewed By: chandlerc, tejohnson Subscribers: tejohnson, llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D34720 llvm-svn: 306763
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 656421ee58d..ac4765f9607 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -1484,7 +1484,8 @@ bool SampleProfileLoader::runOnFunction(Function &F) {
PreservedAnalyses SampleProfileLoaderPass::run(Module &M,
ModuleAnalysisManager &AM) {
- SampleProfileLoader SampleLoader(SampleProfileFile);
+ SampleProfileLoader SampleLoader(
+ ProfileFileName.empty() ? SampleProfileFile : ProfileFileName);
SampleLoader.doInitialization(M);
OpenPOWER on IntegriCloud