mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Initialize loop data first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -418,6 +418,7 @@ unsigned LoopUnswitch::getLoopUnswitchCost(Value *LIC) {
|
|||||||
/// unswitch the loop, reprocess the pieces, then return true.
|
/// unswitch the loop, reprocess the pieces, then return true.
|
||||||
bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){
|
bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){
|
||||||
|
|
||||||
|
initLoopData();
|
||||||
Function *F = loopHeader->getParent();
|
Function *F = loopHeader->getParent();
|
||||||
|
|
||||||
// Do not unswitch if the function is optimized for size.
|
// Do not unswitch if the function is optimized for size.
|
||||||
@@ -441,8 +442,6 @@ bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
initLoopData();
|
|
||||||
|
|
||||||
Constant *CondVal;
|
Constant *CondVal;
|
||||||
BasicBlock *ExitBlock;
|
BasicBlock *ExitBlock;
|
||||||
if (IsTrivialUnswitchCondition(LoopCond, &CondVal, &ExitBlock)) {
|
if (IsTrivialUnswitchCondition(LoopCond, &CondVal, &ExitBlock)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user