aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-04-18 01:19:55 +0000
committerDevang Patel <dpatel@apple.com>2007-04-18 01:19:55 +0000
commit5a713cc72fd56c81e4cccc582f5eb0c731ad7c9f (patch)
tree77871a1ebc7f96a6ea097c5d3671deb03fec4322 /lib/Analysis
parent8dcd2f1a5bbb9151ec05532861be58bf3f078e63 (diff)
downloadexternal_llvm-5a713cc72fd56c81e4cccc582f5eb0c731ad7c9f.zip
external_llvm-5a713cc72fd56c81e4cccc582f5eb0c731ad7c9f.tar.gz
external_llvm-5a713cc72fd56c81e4cccc582f5eb0c731ad7c9f.tar.bz2
Cache DT[*SI] lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/PostDominators.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp
index b239596..add25fd 100644
--- a/lib/Analysis/PostDominators.cpp
+++ b/lib/Analysis/PostDominators.cpp
@@ -282,10 +282,12 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT,
if (BB)
for (pred_iterator SI = pred_begin(BB), SE = pred_end(BB);
- SI != SE; ++SI)
+ SI != SE; ++SI) {
// Does Node immediately dominate this predecessor?
- if (DT[*SI] && DT[*SI]->getIDom() != Node)
+ DominatorTree::Node *SINode = DT[*SI];
+ if (SINode && SINode->getIDom() != Node)
S.insert(*SI);
+ }
// At this point, S is DFlocal. Now we union in DFup's of our children...
// Loop through and visit the nodes that Node immediately dominates (Node's