Remove some unused variables and methods warned about by
authorDuncan Sands <baldrick@free.fr>
Sun, 6 Sep 2009 08:33:48 +0000 (08:33 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 6 Sep 2009 08:33:48 +0000 (08:33 +0000)
icc (#177, partial).  Patch by Erick Tryzelaar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/VirtRegRewriter.cpp
lib/Support/APInt.cpp
lib/Target/ARM/Thumb1RegisterInfo.cpp
lib/Target/MSIL/MSILWriter.cpp
lib/Target/MSP430/MSP430RegisterInfo.cpp
lib/Target/SystemZ/SystemZRegisterInfo.cpp
lib/VMCore/AsmWriter.cpp
utils/TableGen/FastISelEmitter.cpp

index 749170fb148caeb51c5483c34447d73ec93691f7..58f931234e1bd45cfebceeaff884585dde33ca67 100644 (file)
@@ -4481,7 +4481,6 @@ SDValue DAGCombiner::visitBRCOND(SDNode *N) {
     if (Op0.getOpcode() == ISD::AND &&
         Op0.hasOneUse() &&
         Op1.getOpcode() == ISD::Constant) {
-      SDValue AndOp0 = Op0.getOperand(0);
       SDValue AndOp1 = Op0.getOperand(1);
 
       if (AndOp1.getOpcode() == ISD::Constant) {
@@ -5405,7 +5404,6 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
 SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
   unsigned NumInScalars = N->getNumOperands();
   EVT VT = N->getValueType(0);
-  EVT EltType = VT.getVectorElementType();
 
   // Check to see if this is a BUILD_VECTOR of a bunch of EXTRACT_VECTOR_ELT
   // operations.  If so, and if the EXTRACT_VECTOR_ELT vector inputs come from
@@ -5506,7 +5504,6 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
   unsigned NumElts = VT.getVectorNumElements();
 
   SDValue N0 = N->getOperand(0);
-  SDValue N1 = N->getOperand(1);
 
   assert(N0.getValueType().getVectorNumElements() == NumElts &&
         "Vector shuffle must be normalized in DAG");
index 79b366ca8d0dec9a9207d694be9a96cb6a9e536c..670e1cb575e6d4d1a56160577f5a9aa3a60a057d 100644 (file)
@@ -1128,8 +1128,7 @@ private:
       return false;
 
     // Back-schedule reloads and remats.
-    MachineBasicBlock::iterator InsertLoc =
-      ComputeReloadLoc(MII, MBB.begin(), PhysReg, TRI, false, SS, TII, MF);
+    ComputeReloadLoc(MII, MBB.begin(), PhysReg, TRI, false, SS, TII, MF);
 
     // Load from SS to the spare physical register.
     TII->loadRegFromStackSlot(MBB, MII, PhysReg, SS, RC);
index 5f744e72f9f64745eb2984f5f307046a5a246f97..d7706268dc21c4a07efcb0bc6c0ed508c6a9744f 100644 (file)
@@ -1481,9 +1481,7 @@ APInt::ms APInt::magic() const {
   const APInt& d = *this;
   unsigned p;
   APInt ad, anc, delta, q1, r1, q2, r2, t;
-  APInt allOnes = APInt::getAllOnesValue(d.getBitWidth());
   APInt signedMin = APInt::getSignedMinValue(d.getBitWidth());
-  APInt signedMax = APInt::getSignedMaxValue(d.getBitWidth());
   struct ms mag;
 
   ad = d.abs();
index 796057f9c53634709e82aeb92266a126b81975b7..258912be79f6088b84bdceeaae4919d7c6973122 100644 (file)
@@ -737,8 +737,7 @@ void Thumb1RegisterInfo::emitPrologue(MachineFunction &MF) const {
   // Darwin ABI requires FP to point to the stack slot that contains the
   // previous FP.
   if (STI.isTargetDarwin() || hasFP(MF)) {
-    MachineInstrBuilder MIB =
-      BuildMI(MBB, MBBI, dl, TII.get(ARM::tADDrSPi), FramePtr)
+    BuildMI(MBB, MBBI, dl, TII.get(ARM::tADDrSPi), FramePtr)
       .addFrameIndex(FramePtrSpillFI).addImm(0);
   }
 
index f55b4604bfc9e0f1ef5bc1cc16005e937ea56f72..26d637b4347b3197e0e9a21d072550ade52dd98a 100644 (file)
@@ -1678,7 +1678,6 @@ void MSILWriter::printExternals() {
        E = ModulePtr->global_end(); I!=E; ++I) {
     if (!I->isDeclaration() || !I->hasDLLImportLinkage()) continue;
     // Use "LoadLibrary"/"GetProcAddress" to recive variable address.
-    std::string Label = "not_null$_"+utostr(getUniqID());
     std::string Tmp = getTypeName(I->getType())+getValueName(&*I);
     printSimpleInstruction("ldsflda",Tmp.c_str());
     Out << "\tldstr\t\"" << getLibraryName(&*I) << "\"\n";
index 72994eb1293a6a4df7a5401022ac0b30a49bf3ba..f101686aef4925ddf3d9a141d411b1184d3ca307 100644 (file)
@@ -311,7 +311,6 @@ void MSP430RegisterInfo::emitEpilogue(MachineFunction &MF,
     NumBytes = StackSize - CSSize;
 
   // Skip the callee-saved pop instructions.
-  MachineBasicBlock::iterator LastCSPop = MBBI;
   while (MBBI != MBB.begin()) {
     MachineBasicBlock::iterator PI = prior(MBBI);
     unsigned Opc = PI->getOpcode();
index 643d681563dda5325ad0efb8be191437af376bb8..4a4e71f606ce77b8430848a7f824b0eaaa910d90 100644 (file)
@@ -259,7 +259,6 @@ void SystemZRegisterInfo::emitEpilogue(MachineFunction &MF,
   SystemZMachineFunctionInfo *SystemZMFI =
     MF.getInfo<SystemZMachineFunctionInfo>();
   unsigned RetOpcode = MBBI->getOpcode();
-  DebugLoc DL = MBBI->getDebugLoc();
 
   switch (RetOpcode) {
   case SystemZ::RET: break;  // These are ok
index 5062075a46c2f9b764109036b937e0858d7677be..a61f8fb2315af78113c783251c37ef8fbdac4295 100644 (file)
@@ -1282,8 +1282,6 @@ public:
   void writeOperand(const Value *Op, bool PrintType);
   void writeParamOperand(const Value *Operand, Attributes Attrs);
 
-  const Module* getModule() { return TheModule; }
-
 private:
   void printModule(const Module *M);
   void printTypeSymbolTable(const TypeSymbolTable &ST);
index bf92a9a0237be938b60f5b355832767dc24ec32e..277640d79968acd541526485dec0b2dad2ff1c3d 100644 (file)
@@ -216,7 +216,6 @@ public:
   explicit FastISelMap(std::string InstNS);
 
   void CollectPatterns(CodeGenDAGPatterns &CGP);
-  void PrintClass(raw_ostream &OS);
   void PrintFunctionDefinitions(raw_ostream &OS);
 };