summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-21 06:43:46 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-21 06:43:46 +0000
commita8a90a2f977461cc0b5381191a7d128a5d3b57dc (patch)
treea5fd6ca4f2415766f371cf7128c7ba4c64372a61 /llvm/lib/Analysis
parente3068403bdae14287a229e9d7b53c90282946649 (diff)
downloadbcm5719-llvm-a8a90a2f977461cc0b5381191a7d128a5d3b57dc.tar.gz
bcm5719-llvm-a8a90a2f977461cc0b5381191a7d128a5d3b57dc.zip
Add some comments about things that can go away once signless types are in.
llvm-svn: 32727
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 7d03eb9a94e..ec98adc9e24 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/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(),
OpenPOWER on IntegriCloud