aboutsummaryrefslogtreecommitdiff
path: root/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
commit0ac1c6ad9af78654188ca5164c1d0839e834444e (patch)
treee5a66eb68102235cb33d5b671baad5f92612ced0 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent667c349febc16ec921093baedadeeab8488dbe26 (diff)
SDNode::dump should also print out extension type and VT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 2b7a9db73a..61f0a49d7a 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/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>";
}
}