Ensure that dump calls that are associated with asserts are removed from
authorJim Laskey <jlaskey@mac.com>
Tue, 11 Jul 2006 17:58:07 +0000 (17:58 +0000)
committerJim Laskey <jlaskey@mac.com>
Tue, 11 Jul 2006 17:58:07 +0000 (17:58 +0000)
non-debug build.

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

lib/Analysis/IPA/Andersens.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
lib/Target/Alpha/AlphaISelDAGToDAG.cpp
lib/Target/IA64/IA64ISelDAGToDAG.cpp
lib/Target/PowerPC/PPCCodeEmitter.cpp
utils/TableGen/DAGISelEmitter.cpp

index 11886936c868710cf0123d7ffe20b5c64c7f5229..fa9071b9922e9b04bd56112763c907dbc0a59925 100644 (file)
@@ -260,9 +260,8 @@ namespace {
 
       std::map<Value*, unsigned>::iterator I = ValueNodes.find(V);
       if (I == ValueNodes.end()) {
-        V->dump();
-        assert(I != ValueNodes.end() &&
-               "Value does not have a node in the points-to graph!");
+        DEBUG(V->dump());
+        assert(0 && "Value does not have a node in the points-to graph!");
       }
       return &GraphNodes[I->second];
     }
index a798f554fcc42d72cf3efed7e2f76bba82e25dfd..6fe5249af1625d12ac974782c2c1b249a2d29063 100644 (file)
@@ -540,7 +540,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
       return Result.getValue(Op.ResNo);
     }
     // Otherwise this is an unhandled builtin node.  splat.
+#ifndef NDEBUG
     std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+#endif
     assert(0 && "Do not know how to legalize this operator!");
     abort();
   case ISD::GlobalAddress:
@@ -2865,7 +2867,9 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
   case ISD::CopyFromReg:
     assert(0 && "CopyFromReg must be legal!");
   default:
+#ifndef NDEBUG
     std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+#endif
     assert(0 && "Do not know how to promote this operator!");
     abort();
   case ISD::UNDEF:
@@ -4205,7 +4209,9 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
   case ISD::CopyFromReg:
     assert(0 && "CopyFromReg must be legal!");
   default:
+#ifndef NDEBUG
     std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
+#endif
     assert(0 && "Do not know how to expand this operator!");
     abort();
   case ISD::UNDEF:
@@ -4703,7 +4709,11 @@ void SelectionDAGLegalize::SplitVectorOp(SDOperand Op, SDOperand &Lo,
   }
   
   switch (Node->getOpcode()) {
-  default: Node->dump(); assert(0 && "Unhandled operation in SplitVectorOp!");
+  default: 
+#ifndef NDEBUG
+    Node->dump();
+#endif
+    assert(0 && "Unhandled operation in SplitVectorOp!");
   case ISD::VBUILD_VECTOR: {
     std::vector<SDOperand> LoOps(Node->op_begin(), Node->op_begin()+NewNumElts);
     LoOps.push_back(NewNumEltsNode);
@@ -4820,7 +4830,9 @@ SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op,
   SDOperand Result;
   switch (Node->getOpcode()) {
   default: 
+#ifndef NDEBUG
     Node->dump(); std::cerr << "\n";
+#endif
     assert(0 && "Unknown vector operation in PackVectorOp!");
   case ISD::VADD:
   case ISD::VSUB:
index 5d404f0766fe4112ba5c7d64cc788a495677f597..528225223decbf8f56de94a62013fba319b99d0f 100644 (file)
@@ -421,7 +421,7 @@ void ScheduleDAG::EmitNode(SDNode *Node,
   } else {
     switch (Node->getOpcode()) {
     default:
-      Node->dump(); 
+      DEBUG(Node->dump()); 
       assert(0 && "This target-independent node should have been selected!");
     case ISD::EntryToken: // fall thru
     case ISD::TokenFactor:
index 7443371be3a9d262d1a59f325e451d24f8e54fa7..32d5222a025a1605c0e7a2df0a834a01bfb42f04 100644 (file)
@@ -303,7 +303,7 @@ void AlphaDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
       bool rev = false;
       bool isNE = false;
       switch(CC) {
-      default: N->dump(); assert(0 && "Unknown FP comparison!");
+      default: DEBUG(N->dump()); assert(0 && "Unknown FP comparison!");
       case ISD::SETEQ: case ISD::SETOEQ: case ISD::SETUEQ: Opc = Alpha::CMPTEQ; break;
       case ISD::SETLT: case ISD::SETOLT: case ISD::SETULT: Opc = Alpha::CMPTLT; break;
       case ISD::SETLE: case ISD::SETOLE: case ISD::SETULE: Opc = Alpha::CMPTLE; break;
index 0552677913cc386435973a04cd0109c5b7d65400..d004f0c70c6311ebc9a292bb2793d0e24fc7df99 100644 (file)
@@ -511,7 +511,7 @@ void IA64DAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
       N->getValueType(0) : cast<VTSDNode>(N->getOperand(3))->getVT();
     unsigned Opc;
     switch (TypeBeingLoaded) {
-    default: N->dump(); assert(0 && "Cannot load this type!");
+    default: DEBUG(N->dump()); assert(0 && "Cannot load this type!");
     case MVT::i1: { // this is a bool
       Opc = IA64::LD1; // first we load a byte, then compare for != 0
       if(N->getValueType(0) == MVT::i1) { // XXX: early exit!
index bc0772231f5fb2c7954c576dd9cdfdfa91099a81..f5ea746743a3083555dc5bf1ae373b4527732f66 100644 (file)
@@ -160,7 +160,7 @@ int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
       Reloc = PPC::reloc_pcrel_bx;
     else {
       switch (MI.getOpcode()) {
-      default: MI.dump(); assert(0 && "Unknown instruction for relocation!");
+      default: DEBUG(MI.dump()); assert(0 && "Unknown instruction for relocation!");
       case PPC::LIS:
         Reloc = PPC::reloc_absolute_high;       // Pointer to symbol
         break;
index bf9c27a6ac02e8b04da89d2af799baf9cd0e856e..cef7acf70dea5dbad91b1a32131f948635496523 100644 (file)
@@ -2136,7 +2136,7 @@ public:
         if (DefInit *Pred = dynamic_cast<DefInit*>(Predicates->getElement(i))) {
           Record *Def = Pred->getDef();
           if (!Def->isSubClassOf("Predicate")) {
-            Def->dump();
+            DEBUG(Def->dump());
             assert(0 && "Unknown predicate type!");
           }
           if (!PredicateCheck.empty())
@@ -2344,7 +2344,7 @@ public:
             emitCheck("cast<CondCodeSDNode>(" + RootName + utostr(OpNo) +
                       ")->get() == ISD::" + LeafRec->getName());
           } else {
-            Child->dump();
+            DEBUG(Child->dump());
             std::cerr << " ";
             assert(0 && "Unknown leaf type!");
           }
@@ -2357,7 +2357,7 @@ public:
 
           emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue()));
         } else {
-          Child->dump();
+          DEBUG(Child->dump());
           assert(0 && "Unknown leaf type!");
         }
       }
@@ -2510,7 +2510,7 @@ public:
         return std::make_pair(1, ResNo);
       }
     
-      N->dump();
+      DEBUG(N->dump());
       assert(0 && "Unknown leaf type!");
       return std::make_pair(1, ~0U);
     }