[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Reid Spencer
reid at x10sys.com
Wed Dec 20 22:44:01 PST 2006
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.74 -> 1.75
---
Log message:
Add some comments about things that can go away once signless types are in.
---
Diffs of the changes: (+8 -1)
ScalarEvolution.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.74 llvm/lib/Analysis/ScalarEvolution.cpp:1.75
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.74 Tue Dec 19 16:30:33 2006
+++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Dec 21 00:43:46 2006
@@ -173,6 +173,8 @@
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 @@
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 @@
// 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(),
More information about the llvm-commits
mailing list