projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f423abc
)
Initialize loop data first.
author
Devang Patel
<dpatel@apple.com>
Thu, 4 Sep 2008 20:36:36 +0000
(20:36 +0000)
committer
Devang Patel
<dpatel@apple.com>
Thu, 4 Sep 2008 20:36:36 +0000
(20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55792
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopUnswitch.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopUnswitch.cpp
b/lib/Transforms/Scalar/LoopUnswitch.cpp
index f9046a1a05539aaca6f1fbd5065e087dc22fec55..691a67a4275141964c45fc142ce023f3d085e9e7 100644
(file)
--- a/
lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/
lib/Transforms/Scalar/LoopUnswitch.cpp
@@
-418,6
+418,7
@@
unsigned LoopUnswitch::getLoopUnswitchCost(Value *LIC) {
/// 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
@@
bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){
return false;
}
- initLoopData();
-
Constant *CondVal;
BasicBlock *ExitBlock;
if (IsTrivialUnswitchCondition(LoopCond, &CondVal, &ExitBlock)) {