Add some comments about things that can go away once signless types are in.
llvm-svn: 32727
This commit is contained in:
parent
e3068403bd
commit
a8a90a2f97
|
@ -173,6 +173,8 @@ SCEVConstant::~SCEVConstant() {
|
|||
|
||||
SCEVHandle SCEVConstant::get(ConstantInt *V) {
|
||||
// Make sure that SCEVConstant instances are all unsigned.
|
||||
// FIXME:Signless. This entire if statement can be removed when integer types
|
||||
// are signless. There won't be a need to bitcast then.
|
||||
if (V->getType()->isSigned()) {
|
||||
const Type *NewTy = V->getType()->getUnsignedVersion();
|
||||
V = cast<ConstantInt>(
|
||||
|
@ -459,6 +461,9 @@ SCEVHandle SCEVUnknown::getIntegerSCEV(int Val, const Type *Ty) {
|
|||
C = Constant::getNullValue(Ty);
|
||||
else if (Ty->isFloatingPoint())
|
||||
C = ConstantFP::get(Ty, Val);
|
||||
/// FIXME:Signless. when integer types are signless, just change this to:
|
||||
/// else
|
||||
/// C = ConstantInt::get(Ty, Val);
|
||||
else if (Ty->isSigned())
|
||||
C = ConstantInt::get(Ty, Val);
|
||||
else {
|
||||
|
@ -1574,6 +1579,8 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) {
|
|||
|
||||
// Now that we have it, if it's signed, convert it to an unsigned
|
||||
// range.
|
||||
// FIXME:Signless. This entire if statement can go away when
|
||||
// integers are signless. ConstantRange is already signless.
|
||||
if (CompRange.getLower()->getType()->isSigned()) {
|
||||
const Type *NewTy = RHSC->getValue()->getType();
|
||||
Constant *NewL = ConstantExpr::getBitCast(CompRange.getLower(),
|
||||
|
|
Loading…
Reference in New Issue