[llvm-commits] [llvm] r41713 - /llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp
Devang Patel
dpatel at apple.com
Tue Sep 4 13:46:35 PDT 2007
Author: dpatel
Date: Tue Sep 4 15:46:35 2007
New Revision: 41713
URL: http://llvm.org/viewvc/llvm-project?rev=41713&view=rev
Log:
Insert cloned loop basic blocks before original loop header.
Modified:
llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp
Modified: llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp?rev=41713&r1=41712&r2=41713&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneLoop.cpp Tue Sep 4 15:46:35 2007
@@ -145,7 +145,9 @@
BasicBlock *Latch = OrigL->getLoopLatch();
Function *F = Latch->getParent();
- F->getBasicBlockList().insert(Latch, NewBlocks.begin(), NewBlocks.end());
+ F->getBasicBlockList().insert(OrigL->getHeader(),
+ NewBlocks.begin(), NewBlocks.end());
+
return NewParentLoop;
}
More information about the llvm-commits
mailing list