[llvm-commits] [llvm] r51123 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Evan Cheng evan.cheng at apple.com
Wed May 14 13:26:36 PDT 2008


Author: evancheng
Date: Wed May 14 15:26:35 2008
New Revision: 51123

URL: http://llvm.org/viewvc/llvm-project?rev=51123&view=rev
Log:
Really silence compiler warnings.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=51123&r1=51122&r2=51123&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Wed May 14 15:26:35 2008
@@ -406,8 +406,11 @@
     // Just use the input register directly!
     if (InstanceNo > 0)
       VRBaseMap.erase(SDOperand(Node, ResNo));
+#ifndef NDEBUG
     bool isNew = VRBaseMap.insert(std::make_pair(SDOperand(Node,ResNo),SrcReg));
-    isNew; // Silence compiler warning.
+#else
+    VRBaseMap.insert(std::make_pair(SDOperand(Node,ResNo),SrcReg));
+#endif
     assert(isNew && "Node emitted out of order - early");
     return;
   }
@@ -465,8 +468,11 @@
 
   if (InstanceNo > 0)
     VRBaseMap.erase(SDOperand(Node, ResNo));
+#ifndef NDEBUG
   bool isNew = VRBaseMap.insert(std::make_pair(SDOperand(Node,ResNo), VRBase));
-  isNew; // Silence compiler warning.
+#else
+  VRBaseMap.insert(std::make_pair(SDOperand(Node,ResNo), VRBase));
+#endif
   assert(isNew && "Node emitted out of order - early");
 }
 
@@ -523,8 +529,11 @@
       MI->addOperand(MachineOperand::CreateReg(VRBase, true));
     }
 
+#ifndef NDEBUG
     bool isNew = VRBaseMap.insert(std::make_pair(SDOperand(Node,i), VRBase));
-    isNew; // Silence compiler warning.
+#else
+    VRBaseMap.insert(std::make_pair(SDOperand(Node,i), VRBase));
+#endif
     assert(isNew && "Node emitted out of order - early");
   }
 }
@@ -776,8 +785,11 @@
   } else
     assert(0 && "Node is not insert_subreg, extract_subreg, or subreg_to_reg");
      
+#ifndef NDEBUG
   bool isNew = VRBaseMap.insert(std::make_pair(SDOperand(Node,0), VRBase));
-  isNew; // Silence compiler warning.
+#else
+  VRBaseMap.insert(std::make_pair(SDOperand(Node,0), VRBase));
+#endif
   assert(isNew && "Node emitted out of order - early");
 }
 
@@ -1004,8 +1016,11 @@
       // Copy from physical register.
       assert(I->Reg && "Unknown physical register!");
       unsigned VRBase = MRI.createVirtualRegister(SU->CopyDstRC);
+#ifndef NDEBUG
       bool isNew = VRBaseMap.insert(std::make_pair(SU, VRBase));
-      isNew; // Silence compiler warning.
+#else
+      VRBaseMap.insert(std::make_pair(SU, VRBase));
+#endif
       assert(isNew && "Node emitted out of order - early");
       TII->copyRegToReg(*BB, BB->end(), VRBase, I->Reg,
                         SU->CopyDstRC, SU->CopySrcRC);





More information about the llvm-commits mailing list