[llvm] r178355 - Fix loop style
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Mar 29 11:48:42 PDT 2013
Author: arsenm
Date: Fri Mar 29 13:48:42 2013
New Revision: 178355
URL: http://llvm.org/viewvc/llvm-project?rev=178355&view=rev
Log:
Fix loop style
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=178355&r1=178354&r2=178355&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Fri Mar 29 13:48:42 2013
@@ -1136,7 +1136,7 @@ getNonLocalPointerDepFromBB(const PHITra
// Make sure to clean up the Visited map before continuing on to
// PredTranslationFailure.
- for (unsigned i = 0; i < PredList.size(); i++)
+ for (unsigned i = 0, n = PredList.size(); i < n; ++i)
Visited.erase(PredList[i].first);
goto PredTranslationFailure;
@@ -1148,7 +1148,7 @@ getNonLocalPointerDepFromBB(const PHITra
// any results for. (getNonLocalPointerDepFromBB will modify our
// datastructures in ways the code after the PredTranslationFailure label
// doesn't expect.)
- for (unsigned i = 0; i < PredList.size(); i++) {
+ for (unsigned i = 0, n = PredList.size(); i < n; ++i) {
BasicBlock *Pred = PredList[i].first;
PHITransAddr &PredPointer = PredList[i].second;
Value *PredPtrVal = PredPointer.getAddr();
More information about the llvm-commits
mailing list