mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
Flag -> Glue, the ongoing saga
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122513 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29d8f0cae4
commit
036609bd7d
@ -216,9 +216,9 @@ class SDNodeProperty;
|
||||
def SDNPCommutative : SDNodeProperty; // X op Y == Y op X
|
||||
def SDNPAssociative : SDNodeProperty; // (X op Y) op Z == X op (Y op Z)
|
||||
def SDNPHasChain : SDNodeProperty; // R/W chain operand and result
|
||||
def SDNPOutFlag : SDNodeProperty; // Write a flag result
|
||||
def SDNPInFlag : SDNodeProperty; // Read a flag operand
|
||||
def SDNPOptInFlag : SDNodeProperty; // Optionally read a flag operand
|
||||
def SDNPOutGlue : SDNodeProperty; // Write a flag result
|
||||
def SDNPInGlue : SDNodeProperty; // Read a flag operand
|
||||
def SDNPOptInGlue : SDNodeProperty; // Optionally read a flag operand
|
||||
def SDNPMayStore : SDNodeProperty; // May write to memory, sets 'mayStore'.
|
||||
def SDNPMayLoad : SDNodeProperty; // May read memory, sets 'mayLoad'.
|
||||
def SDNPSideEffect : SDNodeProperty; // Sets 'HasUnmodelledSideEffects'.
|
||||
@ -312,13 +312,13 @@ def or : SDNode<"ISD::OR" , SDTIntBinOp,
|
||||
def xor : SDNode<"ISD::XOR" , SDTIntBinOp,
|
||||
[SDNPCommutative, SDNPAssociative]>;
|
||||
def addc : SDNode<"ISD::ADDC" , SDTIntBinOp,
|
||||
[SDNPCommutative, SDNPOutFlag]>;
|
||||
[SDNPCommutative, SDNPOutGlue]>;
|
||||
def adde : SDNode<"ISD::ADDE" , SDTIntBinOp,
|
||||
[SDNPCommutative, SDNPOutFlag, SDNPInFlag]>;
|
||||
[SDNPCommutative, SDNPOutGlue, SDNPInGlue]>;
|
||||
def subc : SDNode<"ISD::SUBC" , SDTIntBinOp,
|
||||
[SDNPOutFlag]>;
|
||||
[SDNPOutGlue]>;
|
||||
def sube : SDNode<"ISD::SUBE" , SDTIntBinOp,
|
||||
[SDNPOutFlag, SDNPInFlag]>;
|
||||
[SDNPOutGlue, SDNPInGlue]>;
|
||||
|
||||
def sext_inreg : SDNode<"ISD::SIGN_EXTEND_INREG", SDTExtInreg>;
|
||||
def bswap : SDNode<"ISD::BSWAP" , SDTIntUnaryOp>;
|
||||
|
@ -72,30 +72,30 @@ def ARMWrapper : SDNode<"ARMISD::Wrapper", SDTIntUnaryOp>;
|
||||
def ARMWrapperJT : SDNode<"ARMISD::WrapperJT", SDTIntBinOp>;
|
||||
|
||||
def ARMcallseq_start : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def ARMcallseq_end : SDNode<"ISD::CALLSEQ_END", SDT_ARMCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def ARMcall : SDNode<"ARMISD::CALL", SDT_ARMcall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
def ARMcall_pred : SDNode<"ARMISD::CALL_PRED", SDT_ARMcall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
def ARMcall_nolink : SDNode<"ARMISD::CALL_NOLINK", SDT_ARMcall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def ARMretflag : SDNode<"ARMISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def ARMcmov : SDNode<"ARMISD::CMOV", SDT_ARMCMov,
|
||||
[SDNPInFlag]>;
|
||||
[SDNPInGlue]>;
|
||||
def ARMcneg : SDNode<"ARMISD::CNEG", SDT_ARMCMov,
|
||||
[SDNPInFlag]>;
|
||||
[SDNPInGlue]>;
|
||||
|
||||
def ARMbrcond : SDNode<"ARMISD::BRCOND", SDT_ARMBrcond,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue]>;
|
||||
|
||||
def ARMbrjt : SDNode<"ARMISD::BR_JT", SDT_ARMBrJT,
|
||||
[SDNPHasChain]>;
|
||||
@ -106,16 +106,16 @@ def ARMBcci64 : SDNode<"ARMISD::BCC_i64", SDT_ARMBCC_i64,
|
||||
[SDNPHasChain]>;
|
||||
|
||||
def ARMcmp : SDNode<"ARMISD::CMP", SDT_ARMCmp,
|
||||
[SDNPOutFlag]>;
|
||||
[SDNPOutGlue]>;
|
||||
|
||||
def ARMcmpZ : SDNode<"ARMISD::CMPZ", SDT_ARMCmp,
|
||||
[SDNPOutFlag, SDNPCommutative]>;
|
||||
[SDNPOutGlue, SDNPCommutative]>;
|
||||
|
||||
def ARMpic_add : SDNode<"ARMISD::PIC_ADD", SDT_ARMPICAdd>;
|
||||
|
||||
def ARMsrl_flag : SDNode<"ARMISD::SRL_FLAG", SDTIntUnaryOp, [SDNPOutFlag]>;
|
||||
def ARMsra_flag : SDNode<"ARMISD::SRA_FLAG", SDTIntUnaryOp, [SDNPOutFlag]>;
|
||||
def ARMrrx : SDNode<"ARMISD::RRX" , SDTIntUnaryOp, [SDNPInFlag ]>;
|
||||
def ARMsrl_flag : SDNode<"ARMISD::SRL_FLAG", SDTIntUnaryOp, [SDNPOutGlue]>;
|
||||
def ARMsra_flag : SDNode<"ARMISD::SRA_FLAG", SDTIntUnaryOp, [SDNPOutGlue]>;
|
||||
def ARMrrx : SDNode<"ARMISD::RRX" , SDTIntUnaryOp, [SDNPInGlue ]>;
|
||||
|
||||
def ARMthread_pointer: SDNode<"ARMISD::THREAD_POINTER", SDT_ARMThreadPointer>;
|
||||
def ARMeh_sjlj_setjmp: SDNode<"ARMISD::EH_SJLJ_SETJMP",
|
||||
@ -136,7 +136,7 @@ def ARMPreload : SDNode<"ARMISD::PRELOAD", SDTPrefetch,
|
||||
def ARMrbit : SDNode<"ARMISD::RBIT", SDTIntUnaryOp>;
|
||||
|
||||
def ARMtcret : SDNode<"ARMISD::TC_RETURN", SDT_ARMTCRET,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
|
||||
|
||||
|
||||
def ARMbfi : SDNode<"ARMISD::BFI", SDT_ARMBFI>;
|
||||
|
@ -16,7 +16,7 @@
|
||||
//
|
||||
|
||||
def ARMtcall : SDNode<"ARMISD::tCALL", SDT_ARMcall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def imm_neg_XFORM : SDNodeXForm<imm, [{
|
||||
|
@ -21,9 +21,9 @@ def arm_ftoui : SDNode<"ARMISD::FTOUI", SDT_FTOI>;
|
||||
def arm_ftosi : SDNode<"ARMISD::FTOSI", SDT_FTOI>;
|
||||
def arm_sitof : SDNode<"ARMISD::SITOF", SDT_ITOF>;
|
||||
def arm_uitof : SDNode<"ARMISD::UITOF", SDT_ITOF>;
|
||||
def arm_fmstat : SDNode<"ARMISD::FMSTAT", SDTNone, [SDNPInFlag, SDNPOutFlag]>;
|
||||
def arm_cmpfp : SDNode<"ARMISD::CMPFP", SDT_ARMCmp, [SDNPOutFlag]>;
|
||||
def arm_cmpfp0 : SDNode<"ARMISD::CMPFPw0", SDT_CMPFP0, [SDNPOutFlag]>;
|
||||
def arm_fmstat : SDNode<"ARMISD::FMSTAT", SDTNone, [SDNPInGlue, SDNPOutGlue]>;
|
||||
def arm_cmpfp : SDNode<"ARMISD::CMPFP", SDT_ARMCmp, [SDNPOutGlue]>;
|
||||
def arm_cmpfp0 : SDNode<"ARMISD::CMPFPw0", SDT_CMPFP0, [SDNPOutGlue]>;
|
||||
def arm_fmdrr : SDNode<"ARMISD::VMOVDRR", SDT_VMOVDRR>;
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ def Alpha_gprelhi : SDNode<"AlphaISD::GPRelHi", SDTIntBinOp, []>;
|
||||
def Alpha_rellit : SDNode<"AlphaISD::RelLit", SDTIntBinOp, [SDNPMayLoad]>;
|
||||
|
||||
def retflag : SDNode<"AlphaISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
// These are target-independent nodes, but have target-specific formats.
|
||||
def SDT_AlphaCallSeqStart : SDCallSeqStart<[ SDTCisVT<0, i64> ]>;
|
||||
@ -35,9 +35,9 @@ def SDT_AlphaCallSeqEnd : SDCallSeqEnd<[ SDTCisVT<0, i64>,
|
||||
SDTCisVT<1, i64> ]>;
|
||||
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_AlphaCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_AlphaCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
//********************
|
||||
//Paterns for matching
|
||||
|
@ -23,17 +23,17 @@ def SDT_BfinCallSeqEnd : SDCallSeqEnd<[ SDTCisVT<0, i32>,
|
||||
SDTCisVT<1, i32> ]>;
|
||||
|
||||
def BfinCallseqStart : SDNode<"ISD::CALLSEQ_START", SDT_BfinCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def BfinCallseqEnd : SDNode<"ISD::CALLSEQ_END", SDT_BfinCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def SDT_BfinCall : SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>;
|
||||
def BfinCall : SDNode<"BFISD::CALL", SDT_BfinCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def BfinRet: SDNode<"BFISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def BfinWrapper: SDNode<"BFISD::Wrapper", SDTIntUnaryOp>;
|
||||
|
||||
|
@ -19,16 +19,16 @@ def SPU_GenControl : SDTypeProfile<1, 1, []>;
|
||||
def SPUshufmask : SDNode<"SPUISD::SHUFFLE_MASK", SPU_GenControl, []>;
|
||||
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_SPUCallSeq,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_SPUCallSeq,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue]>;
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Operand constraints:
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def SDT_SPUCall : SDTypeProfile<0, -1, [SDTCisPtrTy<0>]>;
|
||||
def SPUcall : SDNode<"SPUISD::CALL", SDT_SPUCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
// Operand type constraints for vector shuffle/permute operations
|
||||
@ -156,4 +156,4 @@ class NoEncode<string E> {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def retflag : SDNode<"SPUISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
@ -28,21 +28,21 @@ def SDT_MBCallSeqEnd : SDCallSeqEnd<[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>;
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def MBlazeRet : SDNode<"MBlazeISD::Ret", SDT_MBlazeRet,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
def MBlazeIRet : SDNode<"MBlazeISD::IRet", SDT_MBlazeIRet,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def MBlazeJmpLink : SDNode<"MBlazeISD::JmpLink",SDT_MBlazeJmpLink,
|
||||
[SDNPHasChain,SDNPOptInFlag,SDNPOutFlag,
|
||||
[SDNPHasChain,SDNPOptInGlue,SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def MBWrapper : SDNode<"MBlazeISD::Wrap", SDTIntUnaryOp>;
|
||||
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_MBCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_MBCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// MBlaze Instruction Predicate Definitions.
|
||||
|
@ -40,28 +40,28 @@ def SDT_MSP430Shift : SDTypeProfile<1, 2, [SDTCisSameAs<0, 1>,
|
||||
// MSP430 Specific Node Definitions.
|
||||
//===----------------------------------------------------------------------===//
|
||||
def MSP430retflag : SDNode<"MSP430ISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
def MSP430retiflag : SDNode<"MSP430ISD::RETI_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def MSP430rra : SDNode<"MSP430ISD::RRA", SDTIntUnaryOp, []>;
|
||||
def MSP430rla : SDNode<"MSP430ISD::RLA", SDTIntUnaryOp, []>;
|
||||
def MSP430rrc : SDNode<"MSP430ISD::RRC", SDTIntUnaryOp, []>;
|
||||
|
||||
def MSP430call : SDNode<"MSP430ISD::CALL", SDT_MSP430Call,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, SDNPVariadic]>;
|
||||
def MSP430callseq_start :
|
||||
SDNode<"ISD::CALLSEQ_START", SDT_MSP430CallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def MSP430callseq_end :
|
||||
SDNode<"ISD::CALLSEQ_END", SDT_MSP430CallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
def MSP430Wrapper : SDNode<"MSP430ISD::Wrapper", SDT_MSP430Wrapper>;
|
||||
def MSP430cmp : SDNode<"MSP430ISD::CMP", SDT_MSP430Cmp, [SDNPOutFlag]>;
|
||||
def MSP430cmp : SDNode<"MSP430ISD::CMP", SDT_MSP430Cmp, [SDNPOutGlue]>;
|
||||
def MSP430brcc : SDNode<"MSP430ISD::BR_CC", SDT_MSP430BrCC,
|
||||
[SDNPHasChain, SDNPInFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue]>;
|
||||
def MSP430selectcc: SDNode<"MSP430ISD::SELECT_CC", SDT_MSP430SelectCC,
|
||||
[SDNPInFlag]>;
|
||||
[SDNPInGlue]>;
|
||||
def MSP430shl : SDNode<"MSP430ISD::SHL", SDT_MSP430Shift, []>;
|
||||
def MSP430sra : SDNode<"MSP430ISD::SRA", SDT_MSP430Shift, []>;
|
||||
def MSP430srl : SDNode<"MSP430ISD::SRL", SDT_MSP430Shift, []>;
|
||||
|
@ -32,7 +32,7 @@ def SDT_MipsFPCmp : SDTypeProfile<1, 3, [SDTCisVT<0, i32>,
|
||||
def SDT_MipsFPSelectCC : SDTypeProfile<1, 4, [SDTCisInt<1>, SDTCisInt<4>,
|
||||
SDTCisSameAs<0, 2>, SDTCisSameAs<2, 3>]>;
|
||||
|
||||
def MipsFPRound : SDNode<"MipsISD::FPRound", SDTFPRoundOp, [SDNPOptInFlag]>;
|
||||
def MipsFPRound : SDNode<"MipsISD::FPRound", SDTFPRoundOp, [SDNPOptInGlue]>;
|
||||
def MipsFPBrcond : SDNode<"MipsISD::FPBrcond", SDT_MipsFPBrcond,
|
||||
[SDNPHasChain]>;
|
||||
def MipsFPCmp : SDNode<"MipsISD::FPCmp", SDT_MipsFPCmp>;
|
||||
|
@ -29,7 +29,7 @@ def SDT_MipsCallSeqEnd : SDCallSeqEnd<[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>;
|
||||
|
||||
// Call
|
||||
def MipsJmpLink : SDNode<"MipsISD::JmpLink",SDT_MipsJmpLink,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPOptInFlag,
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
// Hi and Lo nodes are used to handle global addresses. Used on
|
||||
@ -41,13 +41,13 @@ def MipsGPRel : SDNode<"MipsISD::GPRel", SDTIntUnaryOp>;
|
||||
|
||||
// Return
|
||||
def MipsRet : SDNode<"MipsISD::Ret", SDT_MipsRet, [SDNPHasChain,
|
||||
SDNPOptInFlag]>;
|
||||
SDNPOptInGlue]>;
|
||||
|
||||
// These are target-independent nodes, but have target-specific formats.
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_MipsCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_MipsCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
// Select Condition Code
|
||||
def MipsSelectCC : SDNode<"MipsISD::SelectCC", SDT_MipsSelectCC>;
|
||||
|
@ -68,17 +68,17 @@ def PPCstfiwx : SDNode<"PPCISD::STFIWX", SDT_PPCstfiwx,
|
||||
// This sequence is used for long double->int conversions. It changes the
|
||||
// bits in the FPSCR which is not modelled.
|
||||
def PPCmffs : SDNode<"PPCISD::MFFS", SDTypeProfile<1, 0, [SDTCisVT<0, f64>]>,
|
||||
[SDNPOutFlag]>;
|
||||
[SDNPOutGlue]>;
|
||||
def PPCmtfsb0 : SDNode<"PPCISD::MTFSB0", SDTypeProfile<0, 1, [SDTCisInt<0>]>,
|
||||
[SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCmtfsb1 : SDNode<"PPCISD::MTFSB1", SDTypeProfile<0, 1, [SDTCisInt<0>]>,
|
||||
[SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCfaddrtz: SDNode<"PPCISD::FADDRTZ", SDTFPBinOp,
|
||||
[SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCmtfsf : SDNode<"PPCISD::MTFSF", SDTypeProfile<1, 3,
|
||||
[SDTCisVT<0, f64>, SDTCisInt<1>, SDTCisVT<2, f64>,
|
||||
SDTCisVT<3, f64>]>,
|
||||
[SDNPInFlag]>;
|
||||
[SDNPInGlue]>;
|
||||
|
||||
def PPCfsel : SDNode<"PPCISD::FSEL",
|
||||
// Type constraint for fsel.
|
||||
@ -105,45 +105,45 @@ def PPCstd_32 : SDNode<"PPCISD::STD_32" , SDTStore,
|
||||
|
||||
// These are target-independent nodes, but have target-specific formats.
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_PPCCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def SDT_PPCCall : SDTypeProfile<0, -1, [SDTCisInt<0>]>;
|
||||
def PPCcall_Darwin : SDNode<"PPCISD::CALL_Darwin", SDT_PPCCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
def PPCcall_SVR4 : SDNode<"PPCISD::CALL_SVR4", SDT_PPCCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
def PPCnop : SDNode<"PPCISD::NOP", SDT_PPCnop, [SDNPInFlag, SDNPOutFlag]>;
|
||||
def PPCnop : SDNode<"PPCISD::NOP", SDT_PPCnop, [SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCload : SDNode<"PPCISD::LOAD", SDTypeProfile<1, 1, []>,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
def PPCload_toc : SDNode<"PPCISD::LOAD_TOC", SDTypeProfile<0, 1, []>,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCtoc_restore : SDNode<"PPCISD::TOC_RESTORE", SDTypeProfile<0, 0, []>,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue]>;
|
||||
def PPCmtctr : SDNode<"PPCISD::MTCTR", SDT_PPCCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
def PPCbctrl_Darwin : SDNode<"PPCISD::BCTRL_Darwin", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def PPCbctrl_SVR4 : SDNode<"PPCISD::BCTRL_SVR4", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def retflag : SDNode<"PPCISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
|
||||
|
||||
def PPCtc_return : SDNode<"PPCISD::TC_RETURN", SDT_PPCTC_ret,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
|
||||
|
||||
def PPCvcmp : SDNode<"PPCISD::VCMP" , SDT_PPCvcmp, []>;
|
||||
def PPCvcmp_o : SDNode<"PPCISD::VCMPo", SDT_PPCvcmp, [SDNPOutFlag]>;
|
||||
def PPCvcmp_o : SDNode<"PPCISD::VCMPo", SDT_PPCvcmp, [SDNPOutGlue]>;
|
||||
|
||||
def PPCcondbranch : SDNode<"PPCISD::COND_BRANCH", SDT_PPCcondbr,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def PPClbrx : SDNode<"PPCISD::LBRX", SDT_PPClbrx,
|
||||
[SDNPHasChain, SDNPMayLoad]>;
|
||||
|
@ -95,10 +95,10 @@ SDTypeProfile<1, 1, [SDTCisVT<0, f32>, SDTCisFP<1>]>;
|
||||
def SDTSPITOF :
|
||||
SDTypeProfile<1, 1, [SDTCisFP<0>, SDTCisVT<1, f32>]>;
|
||||
|
||||
def SPcmpicc : SDNode<"SPISD::CMPICC", SDTIntBinOp, [SDNPOutFlag]>;
|
||||
def SPcmpfcc : SDNode<"SPISD::CMPFCC", SDTSPcmpfcc, [SDNPOutFlag]>;
|
||||
def SPbricc : SDNode<"SPISD::BRICC", SDTSPbrcc, [SDNPHasChain, SDNPInFlag]>;
|
||||
def SPbrfcc : SDNode<"SPISD::BRFCC", SDTSPbrcc, [SDNPHasChain, SDNPInFlag]>;
|
||||
def SPcmpicc : SDNode<"SPISD::CMPICC", SDTIntBinOp, [SDNPOutGlue]>;
|
||||
def SPcmpfcc : SDNode<"SPISD::CMPFCC", SDTSPcmpfcc, [SDNPOutGlue]>;
|
||||
def SPbricc : SDNode<"SPISD::BRICC", SDTSPbrcc, [SDNPHasChain, SDNPInGlue]>;
|
||||
def SPbrfcc : SDNode<"SPISD::BRFCC", SDTSPbrcc, [SDNPHasChain, SDNPInGlue]>;
|
||||
|
||||
def SPhi : SDNode<"SPISD::Hi", SDTIntUnaryOp>;
|
||||
def SPlo : SDNode<"SPISD::Lo", SDTIntUnaryOp>;
|
||||
@ -106,8 +106,8 @@ def SPlo : SDNode<"SPISD::Lo", SDTIntUnaryOp>;
|
||||
def SPftoi : SDNode<"SPISD::FTOI", SDTSPFTOI>;
|
||||
def SPitof : SDNode<"SPISD::ITOF", SDTSPITOF>;
|
||||
|
||||
def SPselecticc : SDNode<"SPISD::SELECT_ICC", SDTSPselectcc, [SDNPInFlag]>;
|
||||
def SPselectfcc : SDNode<"SPISD::SELECT_FCC", SDTSPselectcc, [SDNPInFlag]>;
|
||||
def SPselecticc : SDNode<"SPISD::SELECT_ICC", SDTSPselectcc, [SDNPInGlue]>;
|
||||
def SPselectfcc : SDNode<"SPISD::SELECT_FCC", SDTSPselectcc, [SDNPInGlue]>;
|
||||
|
||||
// These are target-independent nodes, but have target-specific formats.
|
||||
def SDT_SPCallSeqStart : SDCallSeqStart<[ SDTCisVT<0, i32> ]>;
|
||||
@ -115,16 +115,16 @@ def SDT_SPCallSeqEnd : SDCallSeqEnd<[ SDTCisVT<0, i32>,
|
||||
SDTCisVT<1, i32> ]>;
|
||||
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_SPCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_SPCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def SDT_SPCall : SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>;
|
||||
def call : SDNode<"SPISD::CALL", SDT_SPCall,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def retflag : SDNode<"SPISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def getPCX : Operand<i32> {
|
||||
let PrintMethod = "printGetPCX";
|
||||
|
@ -46,15 +46,15 @@ def SDT_Address : SDTypeProfile<1, 1,
|
||||
// SystemZ Specific Node Definitions.
|
||||
//===----------------------------------------------------------------------===//
|
||||
def SystemZretflag : SDNode<"SystemZISD::RET_FLAG", SDTNone,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
def SystemZcall : SDNode<"SystemZISD::CALL", SDT_SystemZCall,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, SDNPVariadic]>;
|
||||
def SystemZcallseq_start :
|
||||
SDNode<"ISD::CALLSEQ_START", SDT_SystemZCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def SystemZcallseq_end :
|
||||
SDNode<"ISD::CALLSEQ_END", SDT_SystemZCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
def SystemZcmp : SDNode<"SystemZISD::CMP", SDT_CmpTest>;
|
||||
def SystemZucmp : SDNode<"SystemZISD::UCMP", SDT_CmpTest>;
|
||||
def SystemZbrcond : SDNode<"SystemZISD::BRCOND", SDT_BrCond,
|
||||
|
@ -34,12 +34,12 @@ def SDTX86CwdStore : SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>;
|
||||
def X86fld : SDNode<"X86ISD::FLD", SDTX86Fld,
|
||||
[SDNPHasChain, SDNPMayLoad, SDNPMemOperand]>;
|
||||
def X86fst : SDNode<"X86ISD::FST", SDTX86Fst,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPMayStore,
|
||||
[SDNPHasChain, SDNPInGlue, SDNPMayStore,
|
||||
SDNPMemOperand]>;
|
||||
def X86fild : SDNode<"X86ISD::FILD", SDTX86Fild,
|
||||
[SDNPHasChain, SDNPMayLoad, SDNPMemOperand]>;
|
||||
def X86fildflag : SDNode<"X86ISD::FILD_FLAG", SDTX86Fild,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPMayLoad,
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPMayLoad,
|
||||
SDNPMemOperand]>;
|
||||
def X86fp_to_i16mem : SDNode<"X86ISD::FP_TO_INT16_IN_MEM", SDTX86FpToIMem,
|
||||
[SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
|
||||
|
@ -128,10 +128,10 @@ def X86setcc : SDNode<"X86ISD::SETCC", SDTX86SetCC>;
|
||||
def X86setcc_c : SDNode<"X86ISD::SETCC_CARRY", SDTX86SetCC_C>;
|
||||
|
||||
def X86cas : SDNode<"X86ISD::LCMPXCHG_DAG", SDTX86cas,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag, SDNPMayStore,
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue, SDNPMayStore,
|
||||
SDNPMayLoad, SDNPMemOperand]>;
|
||||
def X86cas8 : SDNode<"X86ISD::LCMPXCHG8_DAG", SDTX86cas8,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag, SDNPMayStore,
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue, SDNPMayStore,
|
||||
SDNPMayLoad, SDNPMemOperand]>;
|
||||
def X86AtomAdd64 : SDNode<"X86ISD::ATOMADD64_DAG", SDTX86atomicBinary,
|
||||
[SDNPHasChain, SDNPMayStore,
|
||||
@ -155,7 +155,7 @@ def X86AtomSwap64 : SDNode<"X86ISD::ATOMSWAP64_DAG", SDTX86atomicBinary,
|
||||
[SDNPHasChain, SDNPMayStore,
|
||||
SDNPMayLoad, SDNPMemOperand]>;
|
||||
def X86retflag : SDNode<"X86ISD::RET_FLAG", SDTX86Ret,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
|
||||
|
||||
def X86vastart_save_xmm_regs :
|
||||
SDNode<"X86ISD::VASTART_SAVE_XMM_REGS",
|
||||
@ -167,35 +167,35 @@ def X86vaarg64 :
|
||||
SDNPMemOperand]>;
|
||||
def X86callseq_start :
|
||||
SDNode<"ISD::CALLSEQ_START", SDT_X86CallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def X86callseq_end :
|
||||
SDNode<"ISD::CALLSEQ_END", SDT_X86CallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def X86call : SDNode<"X86ISD::CALL", SDT_X86Call,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPOptInFlag,
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def X86rep_stos: SDNode<"X86ISD::REP_STOS", SDTX86RepStr,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag, SDNPMayStore]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue, SDNPMayStore]>;
|
||||
def X86rep_movs: SDNode<"X86ISD::REP_MOVS", SDTX86RepStr,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag, SDNPMayStore,
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue, SDNPMayStore,
|
||||
SDNPMayLoad]>;
|
||||
|
||||
def X86rdtsc : SDNode<"X86ISD::RDTSC_DAG", SDTX86Void,
|
||||
[SDNPHasChain, SDNPOutFlag, SDNPSideEffect]>;
|
||||
[SDNPHasChain, SDNPOutGlue, SDNPSideEffect]>;
|
||||
|
||||
def X86Wrapper : SDNode<"X86ISD::Wrapper", SDTX86Wrapper>;
|
||||
def X86WrapperRIP : SDNode<"X86ISD::WrapperRIP", SDTX86Wrapper>;
|
||||
|
||||
def X86tlsaddr : SDNode<"X86ISD::TLSADDR", SDT_X86TLSADDR,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
def X86ehret : SDNode<"X86ISD::EH_RETURN", SDT_X86EHRET,
|
||||
[SDNPHasChain]>;
|
||||
|
||||
def X86tcret : SDNode<"X86ISD::TC_RETURN", SDT_X86TCRET,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPVariadic]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
|
||||
|
||||
def X86add_flag : SDNode<"X86ISD::ADD", SDTBinaryArithWithFlags,
|
||||
[SDNPCommutative]>;
|
||||
@ -219,10 +219,10 @@ def X86and_flag : SDNode<"X86ISD::AND", SDTBinaryArithWithFlags,
|
||||
def X86mul_imm : SDNode<"X86ISD::MUL_IMM", SDTIntBinOp>;
|
||||
|
||||
def X86WinAlloca : SDNode<"X86ISD::WIN_ALLOCA", SDTX86Void,
|
||||
[SDNPHasChain, SDNPInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPInGlue, SDNPOutGlue]>;
|
||||
|
||||
def X86TLSCall : SDNode<"X86ISD::TLSCALL", SDT_X86TLSCALL,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// X86 Operand Definitions.
|
||||
|
@ -29,11 +29,11 @@ include "XCoreInstrFormats.td"
|
||||
// Call
|
||||
def SDT_XCoreBranchLink : SDTypeProfile<0, 1, [SDTCisPtrTy<0>]>;
|
||||
def XCoreBranchLink : SDNode<"XCoreISD::BL",SDT_XCoreBranchLink,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag,
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
|
||||
SDNPVariadic]>;
|
||||
|
||||
def XCoreRetsp : SDNode<"XCoreISD::RETSP", SDTBrind,
|
||||
[SDNPHasChain, SDNPOptInFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue]>;
|
||||
|
||||
def SDT_XCoreBR_JT : SDTypeProfile<0, 2,
|
||||
[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>;
|
||||
@ -66,9 +66,9 @@ def SDT_XCoreCallSeqEnd : SDCallSeqEnd<[ SDTCisVT<0, i32>,
|
||||
SDTCisVT<1, i32> ]>;
|
||||
|
||||
def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_XCoreCallSeqStart,
|
||||
[SDNPHasChain, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOutGlue]>;
|
||||
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_XCoreCallSeqEnd,
|
||||
[SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
|
||||
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Instruction Pattern Stuff
|
||||
|
@ -732,12 +732,12 @@ SDNodeInfo::SDNodeInfo(Record *R) : Def(R) {
|
||||
Properties |= 1 << SDNPAssociative;
|
||||
} else if (PropList[i]->getName() == "SDNPHasChain") {
|
||||
Properties |= 1 << SDNPHasChain;
|
||||
} else if (PropList[i]->getName() == "SDNPOutFlag") {
|
||||
Properties |= 1 << SDNPOutFlag;
|
||||
} else if (PropList[i]->getName() == "SDNPInFlag") {
|
||||
Properties |= 1 << SDNPInFlag;
|
||||
} else if (PropList[i]->getName() == "SDNPOptInFlag") {
|
||||
Properties |= 1 << SDNPOptInFlag;
|
||||
} else if (PropList[i]->getName() == "SDNPOutGlue") {
|
||||
Properties |= 1 << SDNPOutGlue;
|
||||
} else if (PropList[i]->getName() == "SDNPInGlue") {
|
||||
Properties |= 1 << SDNPInGlue;
|
||||
} else if (PropList[i]->getName() == "SDNPOptInGlue") {
|
||||
Properties |= 1 << SDNPOptInGlue;
|
||||
} else if (PropList[i]->getName() == "SDNPMayStore") {
|
||||
Properties |= 1 << SDNPMayStore;
|
||||
} else if (PropList[i]->getName() == "SDNPMayLoad") {
|
||||
|
@ -404,8 +404,8 @@ ComplexPattern::ComplexPattern(Record *R) {
|
||||
for (unsigned i = 0, e = PropList.size(); i != e; ++i)
|
||||
if (PropList[i]->getName() == "SDNPHasChain") {
|
||||
Properties |= 1 << SDNPHasChain;
|
||||
} else if (PropList[i]->getName() == "SDNPOptInFlag") {
|
||||
Properties |= 1 << SDNPOptInFlag;
|
||||
} else if (PropList[i]->getName() == "SDNPOptInGlue") {
|
||||
Properties |= 1 << SDNPOptInGlue;
|
||||
} else if (PropList[i]->getName() == "SDNPMayStore") {
|
||||
Properties |= 1 << SDNPMayStore;
|
||||
} else if (PropList[i]->getName() == "SDNPMayLoad") {
|
||||
|
@ -35,9 +35,9 @@ enum SDNP {
|
||||
SDNPCommutative,
|
||||
SDNPAssociative,
|
||||
SDNPHasChain,
|
||||
SDNPOutFlag,
|
||||
SDNPInFlag,
|
||||
SDNPOptInFlag,
|
||||
SDNPOutGlue,
|
||||
SDNPInGlue,
|
||||
SDNPOptInGlue,
|
||||
SDNPMayLoad,
|
||||
SDNPMayStore,
|
||||
SDNPSideEffect,
|
||||
|
@ -306,7 +306,7 @@ bool EmitNodeMatcherCommon::isEqualImpl(const Matcher *m) const {
|
||||
const EmitNodeMatcherCommon *M = cast<EmitNodeMatcherCommon>(m);
|
||||
return M->OpcodeName == OpcodeName && M->VTs == VTs &&
|
||||
M->Operands == Operands && M->HasChain == HasChain &&
|
||||
M->HasInFlag == HasInFlag && M->HasOutFlag == HasOutFlag &&
|
||||
M->HasInGlue == HasInGlue && M->HasOutGlue == HasOutGlue &&
|
||||
M->HasMemRefs == HasMemRefs &&
|
||||
M->NumFixedArityOperands == NumFixedArityOperands;
|
||||
}
|
||||
|
@ -955,7 +955,7 @@ class EmitNodeMatcherCommon : public Matcher {
|
||||
std::string OpcodeName;
|
||||
const SmallVector<MVT::SimpleValueType, 3> VTs;
|
||||
const SmallVector<unsigned, 6> Operands;
|
||||
bool HasChain, HasInFlag, HasOutFlag, HasMemRefs;
|
||||
bool HasChain, HasInGlue, HasOutGlue, HasMemRefs;
|
||||
|
||||
/// NumFixedArityOperands - If this is a fixed arity node, this is set to -1.
|
||||
/// If this is a varidic node, this is set to the number of fixed arity
|
||||
@ -970,7 +970,7 @@ public:
|
||||
int numfixedarityoperands, bool isMorphNodeTo)
|
||||
: Matcher(isMorphNodeTo ? MorphNodeTo : EmitNode), OpcodeName(opcodeName),
|
||||
VTs(vts, vts+numvts), Operands(operands, operands+numops),
|
||||
HasChain(hasChain), HasInFlag(hasInGlue), HasOutFlag(hasOutGlue),
|
||||
HasChain(hasChain), HasInGlue(hasInGlue), HasOutGlue(hasOutGlue),
|
||||
HasMemRefs(hasmemrefs), NumFixedArityOperands(numfixedarityoperands) {}
|
||||
|
||||
const std::string &getOpcodeName() const { return OpcodeName; }
|
||||
@ -992,8 +992,8 @@ public:
|
||||
|
||||
|
||||
bool hasChain() const { return HasChain; }
|
||||
bool hasInFlag() const { return HasInFlag; }
|
||||
bool hasOutFlag() const { return HasOutFlag; }
|
||||
bool hasInFlag() const { return HasInGlue; }
|
||||
bool hasOutFlag() const { return HasOutGlue; }
|
||||
bool hasMemRefs() const { return HasMemRefs; }
|
||||
int getNumFixedArityOperands() const { return NumFixedArityOperands; }
|
||||
|
||||
|
@ -365,8 +365,8 @@ void MatcherGen::EmitOperatorMatchCode(const TreePatternNode *N,
|
||||
Root->getOperator() == CGP.get_intrinsic_wo_chain_sdnode() ||
|
||||
PInfo.getNumOperands() > 1 ||
|
||||
PInfo.hasProperty(SDNPHasChain) ||
|
||||
PInfo.hasProperty(SDNPInFlag) ||
|
||||
PInfo.hasProperty(SDNPOptInFlag);
|
||||
PInfo.hasProperty(SDNPInGlue) ||
|
||||
PInfo.hasProperty(SDNPOptInGlue);
|
||||
}
|
||||
|
||||
if (NeedCheck)
|
||||
@ -375,7 +375,7 @@ void MatcherGen::EmitOperatorMatchCode(const TreePatternNode *N,
|
||||
}
|
||||
|
||||
// If this node has an output glue and isn't the root, remember it.
|
||||
if (N->NodeHasProperty(SDNPOutFlag, CGP) &&
|
||||
if (N->NodeHasProperty(SDNPOutGlue, CGP) &&
|
||||
N != Pattern.getSrcPattern()) {
|
||||
// TODO: This redundantly records nodes with both glues and chains.
|
||||
|
||||
@ -389,8 +389,8 @@ void MatcherGen::EmitOperatorMatchCode(const TreePatternNode *N,
|
||||
|
||||
// If this node is known to have an input glue or if it *might* have an input
|
||||
// glue, capture it as the glue input of the pattern.
|
||||
if (N->NodeHasProperty(SDNPOptInFlag, CGP) ||
|
||||
N->NodeHasProperty(SDNPInFlag, CGP))
|
||||
if (N->NodeHasProperty(SDNPOptInGlue, CGP) ||
|
||||
N->NodeHasProperty(SDNPInGlue, CGP))
|
||||
AddMatcher(new CaptureGlueInputMatcher());
|
||||
|
||||
for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) {
|
||||
@ -659,12 +659,12 @@ EmitResultInstructionAsOperand(const TreePatternNode *N,
|
||||
bool TreeHasInGlue = false, TreeHasOutGlue = false;
|
||||
if (isRoot) {
|
||||
const TreePatternNode *SrcPat = Pattern.getSrcPattern();
|
||||
TreeHasInGlue = SrcPat->TreeHasProperty(SDNPOptInFlag, CGP) ||
|
||||
SrcPat->TreeHasProperty(SDNPInFlag, CGP);
|
||||
TreeHasInGlue = SrcPat->TreeHasProperty(SDNPOptInGlue, CGP) ||
|
||||
SrcPat->TreeHasProperty(SDNPInGlue, CGP);
|
||||
|
||||
// FIXME2: this is checking the entire pattern, not just the node in
|
||||
// question, doing this just for the root seems like a total hack.
|
||||
TreeHasOutGlue = SrcPat->TreeHasProperty(SDNPOutFlag, CGP);
|
||||
TreeHasOutGlue = SrcPat->TreeHasProperty(SDNPOutGlue, CGP);
|
||||
}
|
||||
|
||||
// NumResults - This is the number of results produced by the instruction in
|
||||
|
@ -116,7 +116,7 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr,
|
||||
// because the code in the pattern generator doesn't handle it right. We
|
||||
// do it anyway for thoroughness.
|
||||
if (!EN->hasOutFlag() &&
|
||||
Pattern.getSrcPattern()->NodeHasProperty(SDNPOutFlag, CGP))
|
||||
Pattern.getSrcPattern()->NodeHasProperty(SDNPOutGlue, CGP))
|
||||
ResultsMatch = false;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user