diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-21 06:43:46 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-21 06:43:46 +0000 |
commit | 2e20d39493aa58dfe7b1f9e8890215f0dedc038f (patch) | |
tree | dab1eff74c0af18406e6bafb5385feba8052c2c0 /lib/Analysis/ScalarEvolution.cpp | |
parent | 1336a6bf06e64a096217628d2cc9644e48a5d7d6 (diff) |
Add some comments about things that can go away once signless types are in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 7d03eb9a94..ec98adc9e2 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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,7 +461,10 @@ SCEVHandle SCEVUnknown::getIntegerSCEV(int Val, const Type *Ty) { C = Constant::getNullValue(Ty); else if (Ty->isFloatingPoint()) C = ConstantFP::get(Ty, Val); - else if (Ty->isSigned()) + /// 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 { C = ConstantInt::get(Ty->getSignedVersion(), Val); @@ -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(), |