add node #'s to debug dumps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-02-24 04:24:44 +00:00
parent f50e83fd03
commit 91ff7f75f5

View File

@ -5484,15 +5484,15 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const {
if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo()) if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo())
if (getMachineOpcode() < TII->getNumOpcodes()) if (getMachineOpcode() < TII->getNumOpcodes())
return TII->get(getMachineOpcode()).getName(); return TII->get(getMachineOpcode()).getName();
return "<<Unknown Machine Node>>"; return "<<Unknown Machine Node #" + utostr(getOpcode()) + ">>";
} }
if (G) { if (G) {
const TargetLowering &TLI = G->getTargetLoweringInfo(); const TargetLowering &TLI = G->getTargetLoweringInfo();
const char *Name = TLI.getTargetNodeName(getOpcode()); const char *Name = TLI.getTargetNodeName(getOpcode());
if (Name) return Name; if (Name) return Name;
return "<<Unknown Target Node>>"; return "<<Unknown Target Node #" + utostr(getOpcode()) + ">>";
} }
return "<<Unknown Node>>"; return "<<Unknown Node #" + utostr(getOpcode()) + ">>";
#ifndef NDEBUG #ifndef NDEBUG
case ISD::DELETED_NODE: case ISD::DELETED_NODE: