Changes in directory llvm/lib/Transforms/IPO:
ArgumentPromotion.cpp updated: 1.28 -> 1.29 GlobalOpt.cpp updated: 1.70 -> 1.71 IndMemRemoval.cpp updated: 1.3 -> 1.4 InlineSimple.cpp updated: 1.74 -> 1.75 Inliner.cpp updated: 1.29 -> 1.30 LowerSetJmp.cpp updated: 1.30 -> 1.31 SimplifyLibCalls.cpp updated: 1.71 -> 1.72 --- Log message: For PR786: http://llvm.org/PR786 : Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. --- Diffs of the changes: (+5 -10) ArgumentPromotion.cpp | 2 -- GlobalOpt.cpp | 2 +- IndMemRemoval.cpp | 2 +- InlineSimple.cpp | 2 +- Inliner.cpp | 2 -- LowerSetJmp.cpp | 1 - SimplifyLibCalls.cpp | 4 ++-- 7 files changed, 5 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.28 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.29 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.28 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Thu Nov 2 14:25:50 2006 @@ -259,7 +259,6 @@ // it is safe to unconditionally load the pointer. Use alias analysis to // check to see if the pointer is guaranteed to not be modified from entry of // the function to each of the load instructions. - Function &F = *Arg->getParent(); // Because there could be several/many load instructions, remember which // blocks we know to be transparent to the load. @@ -508,7 +507,6 @@ GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back()); std::vector<Value*> Operands(GEP->op_begin()+1, GEP->op_end()); - unsigned ArgNo = 0; Function::arg_iterator TheArg = I2; for (ScalarizeTable::iterator It = ArgIndices.begin(); *It != Operands; ++It, ++TheArg) { Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.70 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.71 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.70 Wed Nov 1 12:03:33 2006 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Nov 2 14:25:50 2006 @@ -1770,7 +1770,7 @@ return false; InstResult = RetVal; } - } else if (TerminatorInst *TI = dyn_cast<TerminatorInst>(CurInst)) { + } else if (isa<TerminatorInst>(CurInst)) { BasicBlock *NewBB = 0; if (BranchInst *BI = dyn_cast<BranchInst>(CurInst)) { if (BI->isUnconditional()) { Index: llvm/lib/Transforms/IPO/IndMemRemoval.cpp diff -u llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.3 llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.4 --- llvm/lib/Transforms/IPO/IndMemRemoval.cpp:1.3 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/IPO/IndMemRemoval.cpp Thu Nov 2 14:25:50 2006 @@ -77,7 +77,7 @@ BasicBlock* bb = new BasicBlock("entry",FN); Instruction* c = new CastInst(FN->arg_begin(), Type::UIntTy, "c", bb); Instruction* a = new MallocInst(Type::SByteTy, c, "m", bb); - Instruction* R = new ReturnInst(a, bb); + new ReturnInst(a, bb); ++NumBounce; NumBounceSites += F->getNumUses(); F->replaceAllUsesWith(FN); Index: llvm/lib/Transforms/IPO/InlineSimple.cpp diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.74 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.75 --- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.74 Sat Sep 9 15:40:44 2006 +++ llvm/lib/Transforms/IPO/InlineSimple.cpp Thu Nov 2 14:25:50 2006 @@ -245,7 +245,7 @@ // significant future optimization possibilities (like scalar promotion, and // scalarization), so encourage the inlining of the function. // - else if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) { + else if (isa<AllocaInst>(I)) { if (ArgNo < CalleeFI.ArgumentWeights.size()) InlineCost -= CalleeFI.ArgumentWeights[ArgNo].AllocaWeight; Index: llvm/lib/Transforms/IPO/Inliner.cpp diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.29 llvm/lib/Transforms/IPO/Inliner.cpp:1.30 --- llvm/lib/Transforms/IPO/Inliner.cpp:1.29 Wed Jul 12 13:29:36 2006 +++ llvm/lib/Transforms/IPO/Inliner.cpp Thu Nov 2 14:25:50 2006 @@ -129,8 +129,6 @@ DEBUG(std::cerr << " Inlining: cost=" << InlineCost << ", Call: " << *CS.getInstruction()); - Function *Caller = CS.getInstruction()->getParent()->getParent(); - // Attempt to inline the function... if (InlineCallIfPossible(CS, CG, SCCFunctions)) { // Remove this call site from the list. Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.30 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.31 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.30 Fri Oct 20 02:07:24 2006 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Thu Nov 2 14:25:50 2006 @@ -496,7 +496,6 @@ // If not reachable from a setjmp call, don't transform. if (!DFSBlocks.count(BB)) return; - BasicBlock* NormalBB = II.getNormalDest(); BasicBlock* ExceptBB = II.getUnwindDest(); Function* Func = BB->getParent(); Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.71 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.72 --- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.71 Thu Oct 26 01:15:43 2006 +++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Thu Nov 2 14:25:50 2006 @@ -1106,7 +1106,7 @@ CastInst* DestCast = new CastInst(dest,PointerType::get(castType),dest->getName()+".cast",ci); LoadInst* LI = new LoadInst(SrcCast,SrcCast->getName()+".val",ci); - StoreInst* SI = new StoreInst(LI, DestCast, ci); + new StoreInst(LI, DestCast, ci); ci->eraseFromParent(); return true; } @@ -2063,7 +2063,7 @@ Constant* INTLZR = GV->getInitializer(); // Handle the ConstantAggregateZero case - if (ConstantAggregateZero *CAZ = dyn_cast<ConstantAggregateZero>(INTLZR)) { + if (isa<ConstantAggregateZero>(INTLZR)) { // This is a degenerate case. The initializer is constant zero so the // length of the string must be zero. len = 0; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits