summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-10-10 20:05:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-10-10 20:05:10 +0000
commitfe858538c0d8714b50e9ad52b33f101ea51da4cf (patch)
tree0a1e3ac3bedc95bc4a0ae6d5a35b1a3ffe12fac7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentb5f1ff336a7a6e89ce44cbef795e34562528ad4b (diff)
downloadbcm5719-llvm-fe858538c0d8714b50e9ad52b33f101ea51da4cf.tar.gz
bcm5719-llvm-fe858538c0d8714b50e9ad52b33f101ea51da4cf.zip
SDNode::dump should also print out extension type and VT.
llvm-svn: 30860
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 2b7a9db73ab..61f0a49d7a6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2691,6 +2691,27 @@ void SDNode::dump(const SelectionDAG *G) const {
std::cerr << "<null:" << M->getOffset() << ">";
} else if (const VTSDNode *N = dyn_cast<VTSDNode>(this)) {
std::cerr << ":" << getValueTypeString(N->getVT());
+ } else if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(this)) {
+ bool doExt = true;
+ switch (LD->getExtensionType()) {
+ default: doExt = false; break;
+ case ISD::EXTLOAD:
+ std::cerr << " <anyext ";
+ break;
+ case ISD::SEXTLOAD:
+ std::cerr << " <sext ";
+ break;
+ case ISD::ZEXTLOAD:
+ std::cerr << " <zext ";
+ break;
+ }
+ if (doExt)
+ std::cerr << MVT::getValueTypeString(LD->getLoadVT()) << ">";
+
+ if (LD->getAddressingMode() == ISD::PRE_INDEXED)
+ std::cerr << " <pre>";
+ else if (LD->getAddressingMode() == ISD::POST_INDEXED)
+ std::cerr << " <post>";
}
}
OpenPOWER on IntegriCloud