Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.84 -> 1.85 LowerSetJmp.cpp updated: 1.36 -> 1.37 SimplifyLibCalls.cpp updated: 1.83 -> 1.84 --- Log message: Rename BoolTy as Int1Ty. Patch by Sheng Zhou. --- Diffs of the changes: (+7 -7) GlobalOpt.cpp | 10 +++++----- LowerSetJmp.cpp | 2 +- SimplifyLibCalls.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.84 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.85 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.84 Thu Jan 11 06:24:14 2007 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Jan 11 12:21:29 2007 @@ -710,7 +710,7 @@ // 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 @@ /// 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 @@ // 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 @@ 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()); } Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.36 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.37 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.36 Sun Jan 7 00:59:47 2007 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Thu Jan 11 12:21:29 2007 @@ -223,7 +223,7 @@ // 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", Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.83 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.84 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.83 Sun Jan 7 15:45:41 2007 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Thu Jan 11 12:21:29 2007 @@ -940,7 +940,7 @@ 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; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits