diff options
author | Chris Lattner <sabre@nondot.org> | 2005-05-09 04:08:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-05-09 04:08:27 +0000 |
commit | 2bf3c26b2bb783aada259f1c70be6dd0798f6126 (patch) | |
tree | 42e3eaefc4f6fe280a03ddb9e7d20ca9168c645f /lib/CodeGen | |
parent | e3e0f2765afbafa0378a58d2c1b0171df7309e91 (diff) |
Print SrcValue nodes correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index f4d7adcc4e..965976cce3 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1554,6 +1554,7 @@ const char *SDNode::getOperationName() const { switch (getOpcode()) { default: return "<<Unknown>>"; case ISD::PCMARKER: return "PCMarker"; + case ISD::SRCVALUE: return "SrcValue"; case ISD::EntryToken: return "EntryToken"; case ISD::TokenFactor: return "TokenFactor"; case ISD::Constant: return "Constant"; @@ -1712,6 +1713,11 @@ void SDNode::dump() const { std::cerr << "'" << ES->getSymbol() << "'"; } else if (const MVTSDNode *M = dyn_cast<MVTSDNode>(this)) { std::cerr << " - Ty = " << MVT::getValueTypeString(M->getExtraValueType()); + } else if (const SrcValueSDNode *M = dyn_cast<SrcValueSDNode>(this)) { + if (M->getValue()) + std::cerr << "<" << M->getValue() << ":" << M->getOffset() << ">"; + else + std::cerr << "<null:" << M->getOffset() << ">"; } } diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 2ed1fe4709..8d8e1fd366 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -90,6 +90,11 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node, Op += "'" + std::string(ES->getSymbol()) + "'"; } else if (const MVTSDNode *M = dyn_cast<MVTSDNode>(Node)) { Op = Op + " ty=" + MVT::getValueTypeString(M->getExtraValueType()); + } else if (const SrcValueSDNode *M = dyn_cast<SrcValueSDNode>(Node)) { + if (M->getValue()) + Op += "<" + M->getValue()->getName() + ":" + itostr(M->getOffset()) + ">"; + else + Op += "<null:" + itostr(M->getOffset()) + ">"; } return Op; } |