mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 20:30:50 +00:00
Print SrcValue nodes correctly
llvm-svn: 21803
This commit is contained in:
parent
65d61d9d44
commit
6ffae1a3ec
@ -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() << ">";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user