[llvm-commits] [llvm] r60745 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Chris Lattner
sabre at nondot.org
Mon Dec 8 22:44:18 PST 2008
Author: lattner
Date: Tue Dec 9 00:44:17 2008
New Revision: 60745
URL: http://llvm.org/viewvc/llvm-project?rev=60745&view=rev
Log:
convert a couple other places that use pred_iterator to use the caching
pred iterator.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=60745&r1=60744&r2=60745&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Dec 9 00:44:17 2008
@@ -352,7 +352,8 @@
} 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 @@
// 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);
}
}
More information about the llvm-commits
mailing list