continue;
}
+ unsigned AS = GEPOp->getPointerAddressSpace();
// Walk the indices of the GEP, accumulating them into BaseOff/VarIndices.
gep_type_iterator GTI = gep_type_begin(GEPOp);
for (User::const_op_iterator I = GEPOp->op_begin()+1,
// If the integer type is smaller than the pointer size, it is implicitly
// sign extended to pointer size.
unsigned Width = Index->getType()->getIntegerBitWidth();
- if (TD->getPointerSizeInBits() > Width)
+ if (TD->getPointerSizeInBits(AS) > Width)
Extension = EK_SignExt;
// Use GetLinearExpression to decompose the index into a C1*V+C2 form.
// Make sure that we have a scale that makes sense for this target's
// pointer size.
- if (unsigned ShiftBits = 64-TD->getPointerSizeInBits()) {
+ if (unsigned ShiftBits = 64 - TD->getPointerSizeInBits(AS)) {
Scale <<= ShiftBits;
Scale = (int64_t)Scale >> ShiftBits;
}
return NoAlias;
if (isEscapeSource(O2) && isNonEscapingLocalObject(O1))
return NoAlias;
-
- // If one object is a global variable without address taken, the other one
- // is a different object, they will not alias because the global variable
- // in question cannot be indirectly accessed.
- if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(O1))
- if (!GV->AddressMaybeTaken())
- return NoAlias;
-
- if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(O2))
- if (!GV->AddressMaybeTaken())
- return NoAlias;
}
// If the size of one access is larger than the entire object on the other