[llvm-commits] [llvm] r59841 - in /llvm/trunk/lib: Archive/ArchiveWriter.cpp CodeGen/LiveIntervalAnalysis.cpp CodeGen/LiveVariables.cpp CodeGen/LowerSubregs.cpp Transforms/Scalar/PredicateSimplifier.cpp Transforms/Scalar/Reassociate.cpp VMCore/Instructions.cpp

Devang Patel dpatel at apple.com
Fri Nov 21 12:00:59 PST 2008


Author: dpatel
Date: Fri Nov 21 14:00:59 2008
New Revision: 59841

URL: http://llvm.org/viewvc/llvm-project?rev=59841&view=rev
Log:
Silence unused variable warnings.

Modified:
    llvm/trunk/lib/Archive/ArchiveWriter.cpp
    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
    llvm/trunk/lib/CodeGen/LiveVariables.cpp
    llvm/trunk/lib/CodeGen/LowerSubregs.cpp
    llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
    llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
    llvm/trunk/lib/VMCore/Instructions.cpp

Modified: llvm/trunk/lib/Archive/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveWriter.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/Archive/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Archive/ArchiveWriter.cpp Fri Nov 21 14:00:59 2008
@@ -306,8 +306,10 @@
   // Write the header
   ARFile.write((char*)&Hdr, sizeof(Hdr));
 
+#ifndef NDEBUG
   // Save the starting position of the symbol tables data content.
   unsigned startpos = ARFile.tellp();
+#endif
 
   // Write out the symbols sequentially
   for ( Archive::SymTabType::iterator I = symTab.begin(), E = symTab.end();
@@ -321,8 +323,10 @@
     ARFile.write(I->first.data(), I->first.length());
   }
 
+#ifndef NDEBUG
   // Now that we're done with the symbol table, get the ending file position
   unsigned endpos = ARFile.tellp();
+#endif
 
   // Make sure that the amount we wrote is what we pre-computed. This is
   // critical for file integrity purposes.

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Fri Nov 21 14:00:59 2008
@@ -125,6 +125,7 @@
          I != E; ++I) {
       bool inserted = mi2iMap_.insert(std::make_pair(I, MIIndex)).second;
       assert(inserted && "multiple MachineInstr -> index mappings");
+      inserted = true;
       i2miMap_.push_back(I);
       MIIndex += InstrSlots::NUM;
       FunctionSize++;

Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Fri Nov 21 14:00:59 2008
@@ -678,6 +678,7 @@
       if (TargetRegisterInfo::isVirtualRegister(Reg)) {
         bool removed = getVarInfo(Reg).removeKill(MI);
         assert(removed && "kill not in register's VarInfo?");
+        removed = true;
       }
     }
   }

Modified: llvm/trunk/lib/CodeGen/LowerSubregs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LowerSubregs.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LowerSubregs.cpp (original)
+++ llvm/trunk/lib/CodeGen/LowerSubregs.cpp Fri Nov 21 14:00:59 2008
@@ -152,7 +152,9 @@
           MI->getOperand(3).isImm() && "Invalid insert_subreg");
           
   unsigned DstReg = MI->getOperand(0).getReg();
+#ifndef NDEBUG
   unsigned SrcReg = MI->getOperand(1).getReg();
+#endif
   unsigned InsReg = MI->getOperand(2).getReg();
   unsigned SubIdx = MI->getOperand(3).getImm();     
 

Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Fri Nov 21 14:00:59 2008
@@ -341,6 +341,7 @@
     UGE = UGT | EQ_BIT
   };
 
+#ifndef NDEBUG
   /// validPredicate - determines whether a given value is actually a lattice
   /// value. Only used in assertions or debugging.
   static bool validPredicate(LatticeVal LV) {
@@ -355,6 +356,7 @@
         return false;
     }
   }
+#endif
 
   /// reversePredicate - reverse the direction of the inequality
   static LatticeVal reversePredicate(LatticeVal LV) {

Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Fri Nov 21 14:00:59 2008
@@ -53,6 +53,7 @@
   }
 }
 
+#ifndef DEBUG
 /// PrintOps - Print out the expression identified in the Ops list.
 ///
 static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) {
@@ -64,6 +65,7 @@
     cerr << "," << Ops[i].Rank;
   }
 }
+#endif
   
 namespace {
   class VISIBILITY_HIDDEN Reassociate : public FunctionPass {
@@ -282,6 +284,7 @@
       std::swap(LHS, RHS);
       bool Success = !I->swapOperands();
       assert(Success && "swapOperands failed");
+      Success = false;
       MadeChange = true;
     }
   } else if (RHSBO) {

Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=59841&r1=59840&r2=59841&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Fri Nov 21 14:00:59 2008
@@ -2204,6 +2204,7 @@
     if (const VectorType *SrcPTy = dyn_cast<VectorType>(SrcTy)) {
       assert(DestPTy->getBitWidth() == SrcPTy->getBitWidth() &&
              "Casting vector to vector of different widths");
+      SrcPTy = NULL;
       return BitCast;                             // vector -> vector
     } else if (DestPTy->getBitWidth() == SrcBits) {
       return BitCast;                               // float/int -> vector





More information about the llvm-commits mailing list