mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user