summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
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/Transforms/IPO
parent34dceb47573b0aedd188b5e72bb848ba29a4960f (diff)
downloadllvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.gz
llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.bz2
llvm-4fe16d607d11e29d742208894909733f5ad01f8f.tar.xz
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/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp10
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp2
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index c1944dbe95..ce30477c87 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -710,7 +710,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
// If there is a comparison against null, we will insert a global bool to
// keep track of whether the global was initialized yet or not.
GlobalVariable *InitBool =
- new GlobalVariable(Type::BoolTy, false, GlobalValue::InternalLinkage,
+ new GlobalVariable(Type::Int1Ty, false, GlobalValue::InternalLinkage,
ConstantInt::getFalse(), GV->getName()+".init");
bool InitBoolUsed = false;
@@ -1139,13 +1139,13 @@ static bool OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
/// values ever stored into GV are its initializer and OtherVal.
static void ShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
// Create the new global, initializing it to false.
- GlobalVariable *NewGV = new GlobalVariable(Type::BoolTy, false,
+ GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
GlobalValue::InternalLinkage, ConstantInt::getFalse(),
GV->getName()+".b");
GV->getParent()->getGlobalList().insert(GV, NewGV);
Constant *InitVal = GV->getInitializer();
- assert(InitVal->getType() != Type::BoolTy && "No reason to shrink to bool!");
+ assert(InitVal->getType() != Type::Int1Ty && "No reason to shrink to bool!");
// If initialized to zero and storing one into the global, we can use a cast
// instead of a select to synthesize the desired value.
@@ -1341,7 +1341,7 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV,
// Otherwise, if the global was not a boolean, we can shrink it to be a
// boolean.
if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
- if (GV->getType()->getElementType() != Type::BoolTy &&
+ if (GV->getType()->getElementType() != Type::Int1Ty &&
!GV->getType()->getElementType()->isFloatingPoint() &&
!GS.HasPHIUser) {
DOUT << " *** SHRINKING TO BOOL: " << *GV;
@@ -1801,7 +1801,7 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
dyn_cast<ConstantInt>(getVal(Values, BI->getCondition()));
// Cannot determine.
- if (!Cond || Cond->getType() != Type::BoolTy)
+ if (!Cond || Cond->getType() != Type::Int1Ty)
return false;
NewBB = BI->getSuccessor(!Cond->getBoolValue());
}
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index ab6ee23cbb..a7da282c6a 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -223,7 +223,7 @@ bool LowerSetJmp::doInitialization(Module& M)
// bool __llvm_sjljeh_is_longjmp_exception()
IsLJException = M.getOrInsertFunction("__llvm_sjljeh_is_longjmp_exception",
- Type::BoolTy, (Type *)0);
+ Type::Int1Ty, (Type *)0);
// int __llvm_sjljeh_get_longjmp_value()
GetLJValue = M.getOrInsertFunction("__llvm_sjljeh_get_longjmp_value",
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 483c5702c7..d2ab638288 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -940,7 +940,7 @@ static bool IsOnlyUsedInEqualsZeroComparison(Instruction *I) {
cast<Constant>(IC->getOperand(1))->isNullValue())
continue;
} else if (CastInst *CI = dyn_cast<CastInst>(User))
- if (CI->getType() == Type::BoolTy)
+ if (CI->getType() == Type::Int1Ty)
continue;
// Unknown instruction.
return false;