mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -630,7 +630,7 @@ bool LazyValueInfoCache::solveBlockValueNonLocal(LVILatticeVal &BBLV,
|
||||
if (BB == &BB->getParent()->getEntryBlock()) {
|
||||
assert(isa<Argument>(Val) && "Unknown live-in to the entry block");
|
||||
if (NotNull) {
|
||||
const PointerType *PTy = cast<PointerType>(Val->getType());
|
||||
PointerType *PTy = cast<PointerType>(Val->getType());
|
||||
Result = LVILatticeVal::getNot(ConstantPointerNull::get(PTy));
|
||||
} else {
|
||||
Result.markOverdefined();
|
||||
@@ -658,7 +658,7 @@ bool LazyValueInfoCache::solveBlockValueNonLocal(LVILatticeVal &BBLV,
|
||||
// If we previously determined that this is a pointer that can't be null
|
||||
// then return that rather than giving up entirely.
|
||||
if (NotNull) {
|
||||
const PointerType *PTy = cast<PointerType>(Val->getType());
|
||||
PointerType *PTy = cast<PointerType>(Val->getType());
|
||||
Result = LVILatticeVal::getNot(ConstantPointerNull::get(PTy));
|
||||
}
|
||||
|
||||
@@ -728,7 +728,7 @@ bool LazyValueInfoCache::solveBlockValueConstantRange(LVILatticeVal &BBLV,
|
||||
|
||||
ConstantRange LHSRange = LHSVal.getConstantRange();
|
||||
ConstantRange RHSRange(1);
|
||||
const IntegerType *ResultTy = cast<IntegerType>(BBI->getType());
|
||||
IntegerType *ResultTy = cast<IntegerType>(BBI->getType());
|
||||
if (isa<BinaryOperator>(BBI)) {
|
||||
if (ConstantInt *RHS = dyn_cast<ConstantInt>(BBI->getOperand(1))) {
|
||||
RHSRange = ConstantRange(RHS->getValue());
|
||||
|
Reference in New Issue
Block a user