[llvm-commits] [llvm] r55792 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Devang Patel
dpatel at apple.com
Thu Sep 4 13:36:36 PDT 2008
Author: dpatel
Date: Thu Sep 4 15:36:36 2008
New Revision: 55792
URL: http://llvm.org/viewvc/llvm-project?rev=55792&view=rev
Log:
Initialize loop data first.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=55792&r1=55791&r2=55792&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Thu Sep 4 15:36:36 2008
@@ -418,6 +418,7 @@
/// unswitch the loop, reprocess the pieces, then return true.
bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){
+ initLoopData();
Function *F = loopHeader->getParent();
// Do not unswitch if the function is optimized for size.
@@ -441,8 +442,6 @@
return false;
}
- initLoopData();
-
Constant *CondVal;
BasicBlock *ExitBlock;
if (IsTrivialUnswitchCondition(LoopCond, &CondVal, &ExitBlock)) {
More information about the llvm-commits
mailing list