summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite8113a70fa627d9be0e81074c479a073e9047b0d (patch)
treede7e02c39aae550b350058a33131fdd8d377e6f8 /llvm/lib/Analysis
parent18e1da3e804a93c11122fc6e5178066cd81c81ae (diff)
downloadbcm5719-llvm-e8113a70fa627d9be0e81074c479a073e9047b0d.tar.gz
bcm5719-llvm-e8113a70fa627d9be0e81074c479a073e9047b0d.zip
convert a couple other places that use pred_iterator to use the caching
pred iterator. llvm-svn: 60745
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MemoryDependenceAnalysis.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 94395027f21..e75f8875e62 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/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);
}
}
OpenPOWER on IntegriCloud