[llvm-commits] [llvm] r107984 - /llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
Gabor Greif
ggreif at gmail.com
Fri Jul 9 09:31:08 PDT 2010
Author: ggreif
Date: Fri Jul 9 11:31:08 2010
New Revision: 107984
URL: http://llvm.org/viewvc/llvm-project?rev=107984&view=rev
Log:
cache result of operator*
Modified:
llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
Modified: llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp?rev=107984&r1=107983&r2=107984&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BreakCriticalEdges.cpp Fri Jul 9 11:31:08 2010
@@ -403,11 +403,13 @@
bool HasPredOutsideOfLoop = false;
BasicBlock *Exit = ExitBlocks[i];
for (pred_iterator I = pred_begin(Exit), E = pred_end(Exit);
- I != E; ++I)
- if (TIL->contains(*I))
- Preds.push_back(*I);
+ I != E; ++I) {
+ BasicBlock *P = *I;
+ if (TIL->contains(P))
+ Preds.push_back(P);
else
HasPredOutsideOfLoop = true;
+ }
// If there are any preds not in the loop, we'll need to split
// the edges. The Preds.empty() check is needed because a block
// may appear multiple times in the list. We can't use
More information about the llvm-commits
mailing list