mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
SCEV: Use range-based for loop and fold variable into assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e87cadc49a
commit
bfd5dad4c9
@ -7214,14 +7214,12 @@ static void findArrayDimensionsRec(ScalarEvolution &SE,
|
||||
return;
|
||||
}
|
||||
|
||||
const SCEV *Zero = SE.getConstant(GCD->getType(), 0);
|
||||
|
||||
for (unsigned I = 0; I < Terms.size(); ++I) {
|
||||
for (const SCEV *&Term : Terms) {
|
||||
// Normalize the terms before the next call to findArrayDimensionsRec.
|
||||
const SCEV *Q, *R;
|
||||
SCEVDivision::divide(SE, Terms[I], GCD, &Q, &R);
|
||||
assert(R == Zero && "GCD does not evenly divide one of the terms");
|
||||
Terms[I] = Q;
|
||||
SCEVDivision::divide(SE, Term, GCD, &Q, &R);
|
||||
assert(R->isZero() && "GCD does not evenly divide one of the terms");
|
||||
Term = Q;
|
||||
}
|
||||
|
||||
// Remove all SCEVConstants.
|
||||
|
Loading…
x
Reference in New Issue
Block a user