summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJakub Kuderski <kubakuderski@gmail.com>2018-05-23 17:29:21 +0000
committerJakub Kuderski <kubakuderski@gmail.com>2018-05-23 17:29:21 +0000
commitef33edd9b5e321a7248f30b7c9d1794039013b8b (patch)
treeead96ae540e48a0b65c865df4a17d346cd88fde8 /llvm/lib/Transforms
parent3b768e8602cd1d739aaa7d0709aead5a38b47a23 (diff)
downloadbcm5719-llvm-ef33edd9b5e321a7248f30b7c9d1794039013b8b.tar.gz
bcm5719-llvm-ef33edd9b5e321a7248f30b7c9d1794039013b8b.zip
[Dominators] Add PDT constructor from Function
Summary: This patch adds a PDT constructor from Function and lets codes previously using a local class to do this use PostDominatorTree class directly. Reviewers: davide, kuhar, grosser, dberlin Reviewed By: kuhar Author: NutshellySima Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46709 llvm-svn: 333102
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/SampleProfile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp
index 945c660aa78..1c53a82cf8a 100644
--- a/llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -37,6 +37,7 @@
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
+#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/BasicBlock.h"
@@ -253,7 +254,7 @@ protected:
/// Dominance, post-dominance and loop information.
std::unique_ptr<DominatorTree> DT;
- std::unique_ptr<PostDomTreeBase<BasicBlock>> PDT;
+ std::unique_ptr<PostDominatorTree> PDT;
std::unique_ptr<LoopInfo> LI;
std::function<AssumptionCache &(Function &)> GetAC;
@@ -1365,8 +1366,7 @@ void SampleProfileLoader::computeDominanceAndLoopInfo(Function &F) {
DT.reset(new DominatorTree);
DT->recalculate(F);
- PDT.reset(new PostDomTreeBase<BasicBlock>());
- PDT->recalculate(F);
+ PDT.reset(new PostDominatorTree(F));
LI.reset(new LoopInfo);
LI->analyze(*DT);
OpenPOWER on IntegriCloud