aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-09 06:44:17 +0000
committerChris Lattner <sabre@nondot.org>2008-12-09 06:44:17 +0000
commit511b36c00f3fbe80770e0bbbfe8ed2f266148d65 (patch)
tree8b9516235b6ab1493272466bb7d981dacef64c3c /lib/Analysis
parent0401245ab3c0da232322a0cca7edaeff93dd6ff3 (diff)
downloadexternal_llvm-511b36c00f3fbe80770e0bbbfe8ed2f266148d65.zip
external_llvm-511b36c00f3fbe80770e0bbbfe8ed2f266148d65.tar.gz
external_llvm-511b36c00f3fbe80770e0bbbfe8ed2f266148d65.tar.bz2
convert a couple other places that use pred_iterator to use the caching
pred iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index 9439502..e75f887 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -352,7 +352,8 @@ MemoryDependenceAnalysis::getNonLocalDependency(Instruction *QueryInst) {
} else {
// Seed DirtyBlocks with each of the preds of QueryInst's block.
BasicBlock *QueryBB = QueryInst->getParent();
- DirtyBlocks.append(pred_begin(QueryBB), pred_end(QueryBB));
+ for (BasicBlock **PI = PredCache->GetPreds(QueryBB); *PI; ++PI)
+ DirtyBlocks.push_back(*PI);
NumUncacheNonLocal++;
}
@@ -460,7 +461,8 @@ MemoryDependenceAnalysis::getNonLocalDependency(Instruction *QueryInst) {
// If the block *is* completely transparent to the load, we need to check
// the predecessors of this block. Add them to our worklist.
- DirtyBlocks.append(pred_begin(DirtyBB), pred_end(DirtyBB));
+ for (BasicBlock **PI = PredCache->GetPreds(DirtyBB); *PI; ++PI)
+ DirtyBlocks.push_back(*PI);
}
}