Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.85 -> 1.86 --- Log message: Implement review feedback for the ConstantBool->ConstantInt merge. Chris recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. --- Diffs of the changes: (+2 -2) GlobalOpt.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.85 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.86 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.85 Thu Jan 11 12:21:29 2007 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Jan 11 22:24:45 2007 @@ -1161,7 +1161,7 @@ // Only do this if we weren't storing a loaded value. Value *StoreVal; if (StoringOther || SI->getOperand(0) == InitVal) - StoreVal = ConstantInt::get(StoringOther); + StoreVal = ConstantInt::get(Type::Int1Ty, StoringOther); else { // Otherwise, we are storing a previously loaded copy. To do this, // change the copy from copying the original value to just copying the @@ -1803,7 +1803,7 @@ // Cannot determine. if (!Cond || Cond->getType() != Type::Int1Ty) return false; - NewBB = BI->getSuccessor(!Cond->getBoolValue()); + NewBB = BI->getSuccessor(!Cond->getZExtValue()); } } else if (SwitchInst *SI = dyn_cast<SwitchInst>(CurInst)) { ConstantInt *Val = _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits