mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Add a comment to the commit r165187.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
916381569a
commit
eb51e95e61
@ -1261,10 +1261,12 @@ static bool needsLFTR(Loop *L, DominatorTree *DT) {
|
||||
if (!Phi)
|
||||
return true;
|
||||
|
||||
// Do LFTR if the exit condition's IV is *not* a simple counter.
|
||||
// Do LFTR if PHI node is defined in the loop, but is *not* a counter.
|
||||
int Idx = Phi->getBasicBlockIndex(L->getLoopLatch());
|
||||
if (Idx < 0)
|
||||
return true;
|
||||
|
||||
// Do LFTR if the exit condition's IV is *not* a simple counter.
|
||||
Value *IncV = Phi->getIncomingValue(Idx);
|
||||
return Phi != getLoopPhiForCounter(IncV, L, DT);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user