aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-11 18:21:29 +0000
commit4fe16d607d11e29d742208894909733f5ad01f8f (patch)
treea669ba57373e87d31c3af6f301fe4a61f773f4b3 /lib/Analysis
parent34dceb47573b0aedd188b5e72bb848ba29a4960f (diff)
downloadexternal_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.zip
external_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.gz
external_llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.bz2
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp8
-rw-r--r--lib/Analysis/ConstantRange.cpp8
-rw-r--r--lib/Analysis/ScalarEvolution.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 179f069..ebe4cec 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/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/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp
index 1d49e22..6c2dce0 100644
--- a/lib/Analysis/ConstantRange.cpp
+++ b/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/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 9fcbf8c..ad16acc 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/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;