[llvm-commits] [llvm] r107983 - /llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Gabor Greif
ggreif at gmail.com
Fri Jul 9 09:26:41 PDT 2010
Author: ggreif
Date: Fri Jul 9 11:26:41 2010
New Revision: 107983
URL: http://llvm.org/viewvc/llvm-project?rev=107983&view=rev
Log:
cache result of operator*
Modified:
llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=107983&r1=107982&r2=107983&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Fri Jul 9 11:26:41 2010
@@ -617,8 +617,10 @@
// Figure out which basic blocks contain back-edges to the loop header.
std::vector<BasicBlock*> BackedgeBlocks;
- for (pred_iterator I = pred_begin(Header), E = pred_end(Header); I != E; ++I)
- if (*I != Preheader) BackedgeBlocks.push_back(*I);
+ for (pred_iterator I = pred_begin(Header), E = pred_end(Header); I != E; ++I){
+ BasicBlock *P = *I;
+ if (P != Preheader) BackedgeBlocks.push_back(P);
+ }
// Create and insert the new backedge block...
BasicBlock *BEBlock = BasicBlock::Create(Header->getContext(),
More information about the llvm-commits
mailing list