forked from OSchip/llvm-project
[NFC,StackSafety] Rename some variables
This commit is contained in:
parent
14f3357586
commit
804a39a201
|
@ -249,17 +249,17 @@ StackSafetyLocalAnalysis::getAccessRange(Value *Addr, Value *Base,
|
||||||
return ConstantRange::getEmpty(PointerSize);
|
return ConstantRange::getEmpty(PointerSize);
|
||||||
assert(!isUnsafe(SizeRange));
|
assert(!isUnsafe(SizeRange));
|
||||||
|
|
||||||
ConstantRange AccessRange = offsetFrom(Addr, Base);
|
ConstantRange Offsets = offsetFrom(Addr, Base);
|
||||||
if (isUnsafe(AccessRange))
|
if (isUnsafe(Offsets))
|
||||||
return UnknownRange;
|
return UnknownRange;
|
||||||
|
|
||||||
if (AccessRange.signedAddMayOverflow(SizeRange) !=
|
if (Offsets.signedAddMayOverflow(SizeRange) !=
|
||||||
ConstantRange::OverflowResult::NeverOverflows)
|
ConstantRange::OverflowResult::NeverOverflows)
|
||||||
return UnknownRange;
|
return UnknownRange;
|
||||||
AccessRange = AccessRange.add(SizeRange);
|
Offsets = Offsets.add(SizeRange);
|
||||||
if (isUnsafe(AccessRange))
|
if (isUnsafe(Offsets))
|
||||||
return UnknownRange;
|
return UnknownRange;
|
||||||
return AccessRange;
|
return Offsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstantRange StackSafetyLocalAnalysis::getAccessRange(Value *Addr, Value *Base,
|
ConstantRange StackSafetyLocalAnalysis::getAccessRange(Value *Addr, Value *Base,
|
||||||
|
@ -284,13 +284,13 @@ ConstantRange StackSafetyLocalAnalysis::getMemIntrinsicAccessRange(
|
||||||
|
|
||||||
const SCEV *Expr =
|
const SCEV *Expr =
|
||||||
SE.getTruncateOrZeroExtend(SE.getSCEV(MI->getLength()), CalculationTy);
|
SE.getTruncateOrZeroExtend(SE.getSCEV(MI->getLength()), CalculationTy);
|
||||||
ConstantRange LenRange = SE.getSignedRange(Expr);
|
ConstantRange Sizes = SE.getSignedRange(Expr);
|
||||||
assert(!isUnsafe(LenRange));
|
assert(!isUnsafe(Sizes));
|
||||||
if (LenRange.getUpper().isNegative())
|
if (Sizes.getUpper().isNegative())
|
||||||
return UnknownRange;
|
return UnknownRange;
|
||||||
LenRange = LenRange.sextOrTrunc(PointerSize);
|
Sizes = Sizes.sextOrTrunc(PointerSize);
|
||||||
ConstantRange SizeRange(APInt::getNullValue(PointerSize),
|
ConstantRange SizeRange(APInt::getNullValue(PointerSize),
|
||||||
LenRange.getUpper() - 1);
|
Sizes.getUpper() - 1);
|
||||||
return getAccessRange(U, Base, SizeRange);
|
return getAccessRange(U, Base, SizeRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue