summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2016-06-21 19:16:41 +0000
committerDehao Chen <dehao@google.com>2016-06-21 19:16:41 +0000
commit1997d8684f3e70b93364897a13d24eef527ba4a3 (patch)
tree8beb8a94b14b021c852c0d783a4c158f50e13837 /clang/lib
parentc76f9f0df81de05e19e15a7c756d50b413cddbb9 (diff)
downloadbcm5719-llvm-1997d8684f3e70b93364897a13d24eef527ba4a3.tar.gz
bcm5719-llvm-1997d8684f3e70b93364897a13d24eef527ba4a3.zip
Invoke PruneEH pass before Sample Profile pass.
Summary: We need to call PruneEH pass before AutoFDO pass so that some EH-related calls can get inlined in Sample Profile pass. Reviewers: davidxl, dnovillo Subscribers: junbuml, llvm-commits Differential Revision: http://reviews.llvm.org/D21197 llvm-svn: 273298
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index ac47c990d38..fc1a456c0c7 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -488,6 +488,7 @@ void EmitAssemblyHelper::CreatePasses(ModuleSummaryIndex *ModuleSummary) {
PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath;
if (!CodeGenOpts.SampleProfileFile.empty()) {
+ MPM->add(createPruneEHPass());
MPM->add(createSampleProfileLoaderPass(CodeGenOpts.SampleProfileFile));
PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible,
addInstructionCombiningPass);
OpenPOWER on IntegriCloud