Add node and enum for mips tail call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka 2012-10-19 20:59:39 +00:00
parent 96d58e64cf
commit 58d1e3f72a
3 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,7 @@ static SDValue GetGlobalReg(SelectionDAG &DAG, EVT Ty) {
const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const { const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const {
switch (Opcode) { switch (Opcode) {
case MipsISD::JmpLink: return "MipsISD::JmpLink"; case MipsISD::JmpLink: return "MipsISD::JmpLink";
case MipsISD::TailCall: return "MipsISD::TailCall";
case MipsISD::Hi: return "MipsISD::Hi"; case MipsISD::Hi: return "MipsISD::Hi";
case MipsISD::Lo: return "MipsISD::Lo"; case MipsISD::Lo: return "MipsISD::Lo";
case MipsISD::GPRel: return "MipsISD::GPRel"; case MipsISD::GPRel: return "MipsISD::GPRel";

View File

@ -29,6 +29,9 @@ namespace llvm {
// Jump and link (call) // Jump and link (call)
JmpLink, JmpLink,
// Tail call
TailCall,
// Get the Higher 16 bits from a 32-bit immediate // Get the Higher 16 bits from a 32-bit immediate
// No relation with Mips Hi register // No relation with Mips Hi register
Hi, Hi,

View File

@ -52,6 +52,10 @@ def MipsJmpLink : SDNode<"MipsISD::JmpLink",SDT_MipsJmpLink,
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, [SDNPHasChain, SDNPOutGlue, SDNPOptInGlue,
SDNPVariadic]>; SDNPVariadic]>;
// Tail call
def MipsTailCall : SDNode<"MipsISD::TailCall", SDT_MipsJmpLink,
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
// Hi and Lo nodes are used to handle global addresses. Used on // Hi and Lo nodes are used to handle global addresses. Used on
// MipsISelLowering to lower stuff like GlobalAddress, ExternalSymbol // MipsISelLowering to lower stuff like GlobalAddress, ExternalSymbol
// static model. (nothing to do with Mips Registers Hi and Lo) // static model. (nothing to do with Mips Registers Hi and Lo)