diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-11 18:21:29 +0000 |
| commit | 542964f55b2dce5703c9dd88496fde4f7ebf89b6 (patch) | |
| tree | 07d5e88789ee8f5f61159e1ec2def506545fe52a /llvm/lib/Analysis | |
| parent | bd23db9968ac7583431836ffcf9957f8e38c1aea (diff) | |
| download | bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.tar.gz bcm5719-llvm-542964f55b2dce5703c9dd88496fde4f7ebf89b6.zip | |
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ConstantRange.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 179f069716a..ebe4cec60e4 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -435,7 +435,7 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size, 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 @@ BasicAliasAnalysis::CheckGEPInstructions( 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 @@ BasicAliasAnalysis::CheckGEPInstructions( 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 { diff --git a/llvm/lib/Analysis/ConstantRange.cpp b/llvm/lib/Analysis/ConstantRange.cpp index 1d49e224725..6c2dce03aa5 100644 --- a/llvm/lib/Analysis/ConstantRange.cpp +++ b/llvm/lib/Analysis/ConstantRange.cpp @@ -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 ConstantInt *getMaxValue(const Type *Ty, bool isSigned = false) { // 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 @@ static ConstantInt *getMinValue(const Type *Ty, bool isSigned = false) { 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 @@ ConstantInt *ConstantRange::getSingleElement() const { /// 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... diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 9fcbf8c75e4..ad16acc9b40 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1930,7 +1930,7 @@ ComputeIterationCountExhaustively(const Loop *L, Value *Cond, bool ExitWhen) { 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; |

