[NFC,StackSafety] Rename some variables

This commit is contained in:
Vitaly Buka 2020-05-27 13:32:58 -07:00
parent 14f3357586
commit 804a39a201
1 changed files with 11 additions and 11 deletions

View File

@ -249,17 +249,17 @@ StackSafetyLocalAnalysis::getAccessRange(Value *Addr, Value *Base,
return ConstantRange::getEmpty(PointerSize);
assert(!isUnsafe(SizeRange));
ConstantRange AccessRange = offsetFrom(Addr, Base);
if (isUnsafe(AccessRange))
ConstantRange Offsets = offsetFrom(Addr, Base);
if (isUnsafe(Offsets))
return UnknownRange;
if (AccessRange.signedAddMayOverflow(SizeRange) !=
if (Offsets.signedAddMayOverflow(SizeRange) !=
ConstantRange::OverflowResult::NeverOverflows)
return UnknownRange;
AccessRange = AccessRange.add(SizeRange);
if (isUnsafe(AccessRange))
Offsets = Offsets.add(SizeRange);
if (isUnsafe(Offsets))
return UnknownRange;
return AccessRange;
return Offsets;
}
ConstantRange StackSafetyLocalAnalysis::getAccessRange(Value *Addr, Value *Base,
@ -284,13 +284,13 @@ ConstantRange StackSafetyLocalAnalysis::getMemIntrinsicAccessRange(
const SCEV *Expr =
SE.getTruncateOrZeroExtend(SE.getSCEV(MI->getLength()), CalculationTy);
ConstantRange LenRange = SE.getSignedRange(Expr);
assert(!isUnsafe(LenRange));
if (LenRange.getUpper().isNegative())
ConstantRange Sizes = SE.getSignedRange(Expr);
assert(!isUnsafe(Sizes));
if (Sizes.getUpper().isNegative())
return UnknownRange;
LenRange = LenRange.sextOrTrunc(PointerSize);
Sizes = Sizes.sextOrTrunc(PointerSize);
ConstantRange SizeRange(APInt::getNullValue(PointerSize),
LenRange.getUpper() - 1);
Sizes.getUpper() - 1);
return getAccessRange(U, Base, SizeRange);
}