mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 18:29:45 +00:00
Rename a variable for consistency with the ExitBlock vs ExitingBlock
terminology that LoopInfo uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73863 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51f53b7f5a
commit
5392dce881
@ -2299,11 +2299,11 @@ void LoopStrengthReduce::OptimizeLoopTermCond(Loop *L) {
|
||||
// induction variable, to allow coalescing the live ranges for the IV into
|
||||
// one register value.
|
||||
BasicBlock *LatchBlock = L->getLoopLatch();
|
||||
BasicBlock *ExitBlock = L->getExitingBlock();
|
||||
if (!ExitBlock)
|
||||
BasicBlock *ExitingBlock = L->getExitingBlock();
|
||||
if (!ExitingBlock)
|
||||
// Multiple exits, just look at the exit in the latch block if there is one.
|
||||
ExitBlock = LatchBlock;
|
||||
BranchInst *TermBr = dyn_cast<BranchInst>(ExitBlock->getTerminator());
|
||||
ExitingBlock = LatchBlock;
|
||||
BranchInst *TermBr = dyn_cast<BranchInst>(ExitingBlock->getTerminator());
|
||||
if (!TermBr)
|
||||
return;
|
||||
if (TermBr->isUnconditional() || !isa<ICmpInst>(TermBr->getCondition()))
|
||||
@ -2316,7 +2316,7 @@ void LoopStrengthReduce::OptimizeLoopTermCond(Loop *L) {
|
||||
if (!FindIVUserForCond(Cond, CondUse, CondStride))
|
||||
return; // setcc doesn't use the IV.
|
||||
|
||||
if (ExitBlock != LatchBlock) {
|
||||
if (ExitingBlock != LatchBlock) {
|
||||
if (!Cond->hasOneUse())
|
||||
// See below, we don't want the condition to be cloned.
|
||||
return;
|
||||
@ -2378,7 +2378,7 @@ void LoopStrengthReduce::OptimizeLoopTermCond(Loop *L) {
|
||||
|
||||
// If possible, change stride and operands of the compare instruction to
|
||||
// eliminate one stride.
|
||||
if (ExitBlock == LatchBlock)
|
||||
if (ExitingBlock == LatchBlock)
|
||||
Cond = ChangeCompareStride(L, Cond, CondUse, CondStride);
|
||||
|
||||
// It's possible for the setcc instruction to be anywhere in the loop, and
|
||||
|
Loading…
Reference in New Issue
Block a user