/// implement this. The default implementation of this aborts.
virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG);
+ // getTargetNodeName() - This method returns the name of a target specific
+ // DAG node.
+ virtual const char *getTargetNodeName(unsigned Opcode) const;
+
//===--------------------------------------------------------------------===//
// Scheduler hooks
//
if (getOpcode() < ISD::BUILTIN_OP_END)
return "<<Unknown DAG Node>>";
else {
- if (G)
+ if (G) {
if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo())
if (getOpcode()-ISD::BUILTIN_OP_END < TII->getNumOpcodes())
return TII->getName(getOpcode()-ISD::BUILTIN_OP_END);
- std::string Name
- = "<<Unknown Target Node:"
- + itostr((int)getOpcode()-ISD::BUILTIN_OP_END) + ">>";
- return Name.c_str();
+ TargetLowering &TLI = G->getTargetLoweringInfo();
+ const char *Name =
+ TLI.getTargetNodeName(getOpcode());
+ if (Name) return Name;
+ }
+
+ return "<<Unknown Target Node>>";
}
case ISD::PCMARKER: return "PCMarker";
TransformToType[MVT::f64] = MVT::f64;
}
+const char *TargetLowering::getTargetNodeName(unsigned Opcode) const {
+ return NULL;
+}
}
}
}
+
+const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const {
+ switch (Opcode) {
+ default: return NULL;
+ case X86ISD::FILD64m: return "X86ISD::FILD64m";
+ case X86ISD::FP_TO_INT16_IN_MEM: return "X86ISD::FP_TO_INT16_IN_MEM";
+ case X86ISD::FP_TO_INT32_IN_MEM: return "X86ISD::FP_TO_INT32_IN_MEM";
+ case X86ISD::FP_TO_INT64_IN_MEM: return "X86ISD::FP_TO_INT64_IN_MEM";
+ case X86ISD::CALL: return "X86ISD::CALL";
+ case X86ISD::TAILCALL: return "X86ISD::TAILCALL";
+ case X86ISD::RDTSC_DAG: return "X86ISD::RDTSC_DAG";
+ case X86ISD::CMP: return "X86ISD::CMP";
+ case X86ISD::TEST: return "X86ISD::TEST";
+ case X86ISD::CMOV: return "X86ISD::CMOV";
+ case X86ISD::BRCOND: return "X86ISD::BRCOND";
+ }
+}
LowerFrameReturnAddress(bool isFrameAddr, SDOperand Chain, unsigned Depth,
SelectionDAG &DAG);
+ /// getTargetNodeName - This method returns the name of a target specific
+ /// DAG node.
+ virtual const char *getTargetNodeName(unsigned Opcode) const;
+
SDOperand getReturnAddressFrameIndex(SelectionDAG &DAG);
private: