Changes in directory llvm/lib/Transforms/IPO:
Inliner.cpp updated: 1.27 -> 1.28 SimplifyLibCalls.cpp updated: 1.63 -> 1.64 --- Log message: Remove some dead variables. Fix a nasty bug in the memcmp optimizer where we used the wrong variable! --- Diffs of the changes: (+2 -7) Inliner.cpp | 1 - SimplifyLibCalls.cpp | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) Index: llvm/lib/Transforms/IPO/Inliner.cpp diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.27 llvm/lib/Transforms/IPO/Inliner.cpp:1.28 --- llvm/lib/Transforms/IPO/Inliner.cpp:1.27 Sun Jan 22 17:32:06 2006 +++ llvm/lib/Transforms/IPO/Inliner.cpp Fri May 12 18:35:26 2006 @@ -41,7 +41,6 @@ // do so and update the CallGraph for this operation. static bool InlineCallIfPossible(CallSite CS, CallGraph &CG, const std::set<Function*> &SCCFunctions) { - Function *Caller = CS.getInstruction()->getParent()->getParent(); Function *Callee = CS.getCalledFunction(); if (!InlineFunction(CS, &CG)) return false; Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.63 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.64 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.63 Thu Mar 2 19:30:23 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Fri May 12 18:35:26 2006 @@ -386,7 +386,7 @@ // Create a return instruction that we'll replace the call with. // Note that the argument of the return is the argument of the call // instruction. - ReturnInst* ri = new ReturnInst(ci->getOperand(1), ci); + new ReturnInst(ci->getOperand(1), ci); // Split the block at the call instruction which places it in a new // basic block. @@ -444,7 +444,6 @@ /// @brief Optimize the strcat library function virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC) { // Extract some information from the instruction - Module* M = ci->getParent()->getParent()->getParent(); Value* dest = ci->getOperand(1); Value* src = ci->getOperand(2); @@ -807,9 +806,6 @@ // terminator as well. len++; - // Extract some information from the instruction - Module* M = ci->getParent()->getParent()->getParent(); - // We have enough information to now generate the memcpy call to // do the concatenation for us. std::vector<Value*> vals; @@ -996,7 +992,7 @@ Value *G1 = new GetElementPtrInst(Op1Cast, One, "next1v", CI); Value *G2 = new GetElementPtrInst(Op2Cast, One, "next2v", CI); Value *S1V2 = new LoadInst(G1, LHS->getName()+".val2", CI); - Value *S2V2 = new LoadInst(G1, RHS->getName()+".val2", CI); + Value *S2V2 = new LoadInst(G2, RHS->getName()+".val2", CI); Value *D2 = BinaryOperator::createSub(S1V2, S2V2, CI->getName()+".d1", CI); Value *Or = BinaryOperator::createOr(D1, D2, CI->getName()+".res", CI); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits