mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Update LoopSimplify to require and preserve DominatorTree only.
Now LoopSimplify does not require nor preserve ETForest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -316,14 +316,23 @@ void DominatorTreeBase::updateDFSNumbers()
|
||||
for (df_iterator<BasicBlock*> I = df_begin(Roots[i]),
|
||||
E = df_end(Roots[i]); I != E; ++I) {
|
||||
BasicBlock *BB = *I;
|
||||
ETNode *ETN = getNode(BB)->getETNode();
|
||||
if (ETN && !ETN->hasFather())
|
||||
ETN->assignDFSNumber(dfsnum);
|
||||
DomTreeNode *BBNode = getNode(BB);
|
||||
if (BBNode) {
|
||||
ETNode *ETN = BBNode->getETNode();
|
||||
if (ETN && !ETN->hasFather())
|
||||
ETN->assignDFSNumber(dfsnum);
|
||||
}
|
||||
}
|
||||
SlowQueries = 0;
|
||||
DFSInfoValid = true;
|
||||
}
|
||||
|
||||
/// isReachableFromEntry - Return true if A is dominated by the entry
|
||||
/// block of the function containing it.
|
||||
const bool DominatorTreeBase::isReachableFromEntry(BasicBlock* A) {
|
||||
return dominates(&A->getParent()->getEntryBlock(), A);
|
||||
}
|
||||
|
||||
// dominates - Return true if A dominates B. THis performs the
|
||||
// special checks necessary if A and B are in the same basic block.
|
||||
bool DominatorTreeBase::dominates(Instruction *A, Instruction *B) {
|
||||
|
Reference in New Issue
Block a user