cache result of operator*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107977 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-07-09 15:52:36 +00:00
parent 7656018c22
commit 1f2c0c9ead

View File

@ -67,10 +67,11 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT,
if (BB)
for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB);
SI != SE; ++SI) {
BasicBlock *P = *SI;
// Does Node immediately dominate this predecessor?
DomTreeNode *SINode = DT[*SI];
DomTreeNode *SINode = DT[P];
if (SINode && SINode->getIDom() != Node)
S.insert(*SI);
S.insert(P);
}
// At this point, S is DFlocal. Now we union in DFup's of our children...