mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 15:04:57 +00:00
Preserve and update ETForest. Patch by Daniel Berlin
llvm-svn: 25203
This commit is contained in:
parent
7b7fee2d92
commit
d726328ee9
@ -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…
Reference in New Issue
Block a user