aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-07-11 17:58:07 +0000
committerJim Laskey <jlaskey@mac.com>2006-07-11 17:58:07 +0000
commite37fe9b3a1cadceb42ac27fa0718f5a10ea2f0e6 (patch)
treeccc61f6a1210980ae946c0179a7c415cf548102e /lib/CodeGen
parente2a78f2e3dcea4a087fd776aefc56e9edef840a9 (diff)
Ensure that dump calls that are associated with asserts are removed from
non-debug build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp14
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp2
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index a798f554fc..6fe5249af1 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -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:
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 5d404f0766..528225223d 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -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: