mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-18 07:52:35 +00:00
Preserve and update ETForest. Patch by Daniel Berlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88cac3d2f7
commit
dd9e956605
@ -34,6 +34,7 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<ETForest>();
|
||||
AU.addPreserved<DominatorSet>();
|
||||
AU.addPreserved<ImmediateDominators>();
|
||||
AU.addPreserved<DominatorTree>();
|
||||
@ -153,6 +154,10 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
|
||||
ID->addNewBlock(NewBB, TIBB);
|
||||
}
|
||||
|
||||
// Update the forest?
|
||||
if (ETForest *EF = P->getAnalysisToUpdate<ETForest>())
|
||||
EF->addNewBlock(NewBB, TIBB);
|
||||
|
||||
// Should we update DominatorTree information?
|
||||
if (DominatorTree *DT = P->getAnalysisToUpdate<DominatorTree>()) {
|
||||
DominatorTree::Node *TINode = DT->getNode(TIBB);
|
||||
|
Loading…
x
Reference in New Issue
Block a user