diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-09 15:52:36 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-09 15:52:36 +0000 |
commit | d9a0e80213c5b1e48ca48cd320972dceecc16018 (patch) | |
tree | 9e5f90670ebea5d1a98a037328c77eccc3bfcff9 | |
parent | e82532a1c577addfc861d101ec92521367695de0 (diff) | |
download | bcm5719-llvm-d9a0e80213c5b1e48ca48cd320972dceecc16018.tar.gz bcm5719-llvm-d9a0e80213c5b1e48ca48cd320972dceecc16018.zip |
cache result of operator*
llvm-svn: 107977
-rw-r--r-- | llvm/lib/Analysis/PostDominators.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp index f0f3a05db8a..7354afa181b 100644 --- a/llvm/lib/Analysis/PostDominators.cpp +++ b/llvm/lib/Analysis/PostDominators.cpp @@ -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... |