[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp LoopSimplify.cpp LowerInvoke.cpp SimplifyCFG.cpp

Reid Spencer reid at x10sys.com
Thu Nov 2 12:27:05 PST 2006



Changes in directory llvm/lib/Transforms/Utils:

CloneFunction.cpp updated: 1.31 -> 1.32
LoopSimplify.cpp updated: 1.76 -> 1.77
LowerInvoke.cpp updated: 1.42 -> 1.43
SimplifyCFG.cpp updated: 1.102 -> 1.103
---
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:  (+2 -8)

 CloneFunction.cpp |    3 ---
 LoopSimplify.cpp  |    1 -
 LowerInvoke.cpp   |    1 -
 SimplifyCFG.cpp   |    5 ++---
 4 files changed, 2 insertions(+), 8 deletions(-)


Index: llvm/lib/Transforms/Utils/CloneFunction.cpp
diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.31 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.32
--- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.31	Wed Sep 13 16:27:00 2006
+++ llvm/lib/Transforms/Utils/CloneFunction.cpp	Thu Nov  2 14:25:50 2006
@@ -361,10 +361,7 @@
   // requires the CFG to be up-to-date.
   for (unsigned phino = 0, e = PHIToResolve.size(); phino != e; ) {
     const PHINode *OPN = PHIToResolve[phino];
-    
     unsigned NumPreds = OPN->getNumIncomingValues();
-    
-    unsigned BBPHIStart = phino;
     const BasicBlock *OldBB = OPN->getParent();
     BasicBlock *NewBB = cast<BasicBlock>(ValueMap[OldBB]);
 


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.76 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.77
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.76	Sat Sep 23 03:19:21 2006
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp	Thu Nov  2 14:25:50 2006
@@ -763,7 +763,6 @@
   // If NewBB dominates some blocks, then it will dominate all blocks that
   // NewBBSucc does.
   if (NewBBDominatesNewBBSucc) {
-    BasicBlock *PredBlock = PredBlocks[0];
     Function *F = NewBB->getParent();
     for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
       if (DS.dominates(NewBBSucc, I))


Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.42 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.43
--- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.42	Fri Oct 20 02:07:24 2006
+++ llvm/lib/Transforms/Utils/LowerInvoke.cpp	Thu Nov  2 14:25:50 2006
@@ -370,7 +370,6 @@
       // Scan all of the uses and see if the live range is live across an unwind
       // edge.  If we find a use live across an invoke edge, create an alloca
       // and spill the value.
-      AllocaInst *SpillLoc = 0;
       std::set<InvokeInst*> InvokesWithStoreInserted;
 
       // Find all of the blocks that this value is live in.


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.102 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.103
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.102	Sun Oct 29 15:21:20 2006
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Thu Nov  2 14:25:50 2006
@@ -1340,7 +1340,7 @@
         }
       }
     }
-  } else if (UnwindInst *UI = dyn_cast<UnwindInst>(BB->begin())) {
+  } else if (isa<UnwindInst>(BB->begin())) {
     // Check to see if the first instruction in this block is just an unwind.
     // If so, replace any invoke instructions which use this as an exception
     // destination with call instructions, and any unconditional branch
@@ -1409,7 +1409,7 @@
           return 1;
       
     } else {  // Conditional branch
-      if (Value *CompVal = isValueEqualityComparison(BI)) {
+      if (isValueEqualityComparison(BI)) {
         // If we only have one predecessor, and if it is a branch on this value,
         // see if that predecessor totally determines the outcome of this
         // switch.
@@ -1764,7 +1764,6 @@
 
   if (OnlySucc) {
     DEBUG(std::cerr << "Merging: " << *BB << "into: " << *OnlyPred);
-    TerminatorInst *Term = OnlyPred->getTerminator();
 
     // Resolve any PHI nodes at the start of the block.  They are all
     // guaranteed to have exactly one entry if they exist, unless there are






More information about the llvm-commits mailing list