[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp ConstantRange.cpp ScalarEvolution.cpp
Reid Spencer
reid at x10sys.com
Thu Jan 11 10:22:22 PST 2007
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.97 -> 1.98
ConstantRange.cpp updated: 1.26 -> 1.27
ScalarEvolution.cpp updated: 1.82 -> 1.83
---
Log message:
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
---
Diffs of the changes: (+9 -9)
BasicAliasAnalysis.cpp | 8 ++++----
ConstantRange.cpp | 8 ++++----
ScalarEvolution.cpp | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.97 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.98
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.97 Thu Jan 11 06:24:13 2007
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Thu Jan 11 12:21:28 2007
@@ -435,7 +435,7 @@
BasePtr->getType())->getElementType()->isSized()) {
for (unsigned i = 0; i != GEPOperands.size(); ++i)
if (!isa<ConstantInt>(GEPOperands[i]) ||
- GEPOperands[i]->getType() == Type::BoolTy)
+ GEPOperands[i]->getType() == Type::Int1Ty)
GEPOperands[i] =
Constant::getNullValue(GEPOperands[i]->getType());
int64_t Offset =
@@ -610,14 +610,14 @@
if (GEP1Ops.size() > MinOperands) {
for (unsigned i = FirstConstantOper; i != MaxOperands; ++i)
if (isa<ConstantInt>(GEP1Ops[i]) &&
- GEP1Ops[i]->getType() != Type::BoolTy &&
+ GEP1Ops[i]->getType() != Type::Int1Ty &&
!cast<Constant>(GEP1Ops[i])->isNullValue()) {
// Yup, there's a constant in the tail. Set all variables to
// constants in the GEP instruction to make it suiteable for
// TargetData::getIndexedOffset.
for (i = 0; i != MaxOperands; ++i)
if (!isa<ConstantInt>(GEP1Ops[i]) ||
- GEP1Ops[i]->getType() == Type::BoolTy)
+ GEP1Ops[i]->getType() == Type::Int1Ty)
GEP1Ops[i] = Constant::getNullValue(GEP1Ops[i]->getType());
// Okay, now get the offset. This is the relative offset for the full
// instruction.
@@ -670,7 +670,7 @@
const Value *Op2 = i < GEP2Ops.size() ? GEP2Ops[i] : 0;
// If they are equal, use a zero index...
if (Op1 == Op2 && BasePtr1Ty == BasePtr2Ty) {
- if (!isa<ConstantInt>(Op1) || Op1->getType() == Type::BoolTy)
+ if (!isa<ConstantInt>(Op1) || Op1->getType() == Type::Int1Ty)
GEP1Ops[i] = GEP2Ops[i] = Constant::getNullValue(Op1->getType());
// Otherwise, just keep the constants we have.
} else {
Index: llvm/lib/Analysis/ConstantRange.cpp
diff -u llvm/lib/Analysis/ConstantRange.cpp:1.26 llvm/lib/Analysis/ConstantRange.cpp:1.27
--- llvm/lib/Analysis/ConstantRange.cpp:1.26 Thu Jan 11 06:24:13 2007
+++ llvm/lib/Analysis/ConstantRange.cpp Thu Jan 11 12:21:28 2007
@@ -31,7 +31,7 @@
using namespace llvm;
static ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) {
- if (Ty == Type::BoolTy)
+ if (Ty == Type::Int1Ty)
return ConstantInt::getTrue();
if (Ty->isInteger()) {
if (isSigned) {
@@ -48,7 +48,7 @@
// Static constructor to create the minimum constant for an integral type...
static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) {
- if (Ty == Type::BoolTy)
+ if (Ty == Type::Int1Ty)
return ConstantInt::getFalse();
if (Ty->isInteger()) {
if (isSigned) {
@@ -63,7 +63,7 @@
return 0;
}
static ConstantInt *Next(ConstantInt *CI) {
- if (CI->getType() == Type::BoolTy)
+ if (CI->getType() == Type::Int1Ty)
return ConstantInt::get(!CI->getBoolValue());
Constant *Result = ConstantExpr::getAdd(CI,
@@ -205,7 +205,7 @@
///
uint64_t ConstantRange::getSetSize() const {
if (isEmptySet()) return 0;
- if (getType() == Type::BoolTy) {
+ if (getType() == Type::Int1Ty) {
if (Lower != Upper) // One of T or F in the set...
return 1;
return 2; // Must be full set...
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.82 llvm/lib/Analysis/ScalarEvolution.cpp:1.83
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.82 Thu Jan 11 06:24:13 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Jan 11 12:21:28 2007
@@ -1930,7 +1930,7 @@
dyn_cast_or_null<ConstantInt>(EvaluateExpression(Cond, PHIVal));
// Couldn't symbolically evaluate.
- if (!CondVal || CondVal->getType() != Type::BoolTy) return UnknownValue;
+ if (!CondVal || CondVal->getType() != Type::Int1Ty) return UnknownValue;
if (CondVal->getBoolValue() == ExitWhen) {
ConstantEvolutionLoopExitValue[PN] = PHIVal;
More information about the llvm-commits
mailing list