summaryrefslogtreecommitdiff
path: root/src/jit/gentree.h
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2018-05-22 13:50:38 -0700
committerGitHub <noreply@github.com>2018-05-22 13:50:38 -0700
commit7153e441ef21e9bb5e022229c0808b964b9199e0 (patch)
tree6fe6ff629b7784e528322cb9ab6f922478ca4fc1 /src/jit/gentree.h
parent32ab54d345a4ab2eb572fe3ba061b6e0d1b31088 (diff)
downloadcoreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.tar.gz
coreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.tar.bz2
coreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.zip
Remove JIT LEGACY_BACKEND code (#18064)
Remove JIT LEGACY_BACKEND code All code related to the LEGACY_BACKEND JIT is removed. This includes all code related to x87 floating-point code generation. Almost 50,000 lines of code have been removed. Remove legacyjit/legacynonjit directories Remove reg pairs Remove tiny instruction descriptors Remove compCanUseSSE2 (it's always true) Remove unused FEATURE_FP_REGALLOC
Diffstat (limited to 'src/jit/gentree.h')
-rw-r--r--src/jit/gentree.h274
1 files changed, 35 insertions, 239 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 8ff97e42fe..a66f6c6d2b 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -107,9 +107,6 @@ enum genTreeKinds
GTK_BINOP = 0x0008, // binary operator
GTK_RELOP = 0x0010, // comparison operator
GTK_LOGOP = 0x0020, // logical operator
-#ifdef LEGACY_BACKEND
- GTK_ASGOP = 0x0040, // assignment operator
-#endif
GTK_KINDMASK = 0x007F, // operator kind mask
@@ -433,28 +430,6 @@ struct GenTree
}
#endif
-#if FEATURE_STACK_FP_X87
- unsigned char gtFPlvl; // x87 stack depth at this node
- void gtCopyFPlvl(GenTree* other)
- {
- gtFPlvl = other->gtFPlvl;
- }
- void gtSetFPlvl(unsigned level)
- {
- noway_assert(FitsIn<unsigned char>(level));
- gtFPlvl = (unsigned char)level;
- }
-#else // FEATURE_STACK_FP_X87
-
- void gtCopyFPlvl(GenTree* other)
- {
- }
- void gtSetFPlvl(unsigned level)
- {
- }
-
-#endif // FEATURE_STACK_FP_X87
-
//
// Cost metrics on the node. Don't allow direct access to the variable for setting.
//
@@ -532,37 +507,27 @@ private:
CLANG_FORMAT_COMMENT_ANCHOR;
#ifdef DEBUG
+
public:
enum genRegTag
{
- GT_REGTAG_NONE, // Nothing has been assigned to _gtRegNum/_gtRegPair
- GT_REGTAG_REG, // _gtRegNum has been assigned
-#if CPU_LONG_USES_REGPAIR
- GT_REGTAG_REGPAIR // _gtRegPair has been assigned
-#endif
+ GT_REGTAG_NONE, // Nothing has been assigned to _gtRegNum
+ GT_REGTAG_REG // _gtRegNum has been assigned
};
genRegTag GetRegTag() const
{
-#if CPU_LONG_USES_REGPAIR
- assert(gtRegTag == GT_REGTAG_NONE || gtRegTag == GT_REGTAG_REG || gtRegTag == GT_REGTAG_REGPAIR);
-#else
assert(gtRegTag == GT_REGTAG_NONE || gtRegTag == GT_REGTAG_REG);
-#endif
return gtRegTag;
}
private:
- genRegTag gtRegTag; // What is in _gtRegNum/_gtRegPair?
-#endif // DEBUG
+ genRegTag gtRegTag; // What is in _gtRegNum?
+
+#endif // DEBUG
private:
- union {
- // These store the register assigned to the node. If a register is not assigned, _gtRegNum is set to REG_NA
- // or _gtRegPair is set to REG_PAIR_NONE, depending on the node type.
- // For the LEGACY_BACKEND,these are valid only if GTF_REG_VAL is set in gtFlags.
- regNumberSmall _gtRegNum; // which register the value is in
- regPairNoSmall _gtRegPair; // which register pair the value is in
- };
+ // This stores the register assigned to the node. If a register is not assigned, _gtRegNum is set to REG_NA.
+ regNumberSmall _gtRegNum;
public:
// The register number is stored in a small format (8 bits), but the getters return and the setters take
@@ -641,40 +606,12 @@ public:
void SetRegNum(regNumber reg)
{
assert(reg >= REG_FIRST && reg <= REG_COUNT);
- // Make sure the upper bits of _gtRegPair are clear
- _gtRegPair = (regPairNoSmall)0;
- _gtRegNum = (regNumberSmall)reg;
+ _gtRegNum = (regNumberSmall)reg;
INDEBUG(gtRegTag = GT_REGTAG_REG;)
assert(_gtRegNum == reg);
}
-#if CPU_LONG_USES_REGPAIR
- __declspec(property(get = GetRegPair, put = SetRegPair)) regPairNo gtRegPair;
-
- regPairNo GetRegPair() const
- {
- assert((gtRegTag == GT_REGTAG_REGPAIR) || (gtRegTag == GT_REGTAG_NONE)); // TODO-Cleanup: get rid of the NONE
- // case, and fix everyplace that reads
- // undefined values
- regPairNo regPair = (regPairNo)_gtRegPair;
- assert((gtRegTag == GT_REGTAG_NONE) || // TODO-Cleanup: get rid of the NONE case, and fix everyplace that reads
- // undefined values
- (regPair >= REG_PAIR_FIRST && regPair <= REG_PAIR_LAST) ||
- (regPair == REG_PAIR_NONE)); // allow initializing to an undefined value
- return regPair;
- }
-
- void SetRegPair(regPairNo regPair)
- {
- assert((regPair >= REG_PAIR_FIRST && regPair <= REG_PAIR_LAST) ||
- (regPair == REG_PAIR_NONE)); // allow initializing to an undefined value
- _gtRegPair = (regPairNoSmall)regPair;
- INDEBUG(gtRegTag = GT_REGTAG_REGPAIR;)
- assert(_gtRegPair == regPair);
- }
-#endif
-
- // Copy the _gtRegNum/_gtRegPair/gtRegTag fields
+ // Copy the _gtRegNum/gtRegTag fields
void CopyReg(GenTree* from);
bool gtHasReg() const;
@@ -692,15 +629,9 @@ public:
regMaskSmall gtRsvdRegs; // set of fixed trashed registers
-#ifndef LEGACY_BACKEND
unsigned AvailableTempRegCount(regMaskTP mask = (regMaskTP)-1) const;
regNumber GetSingleTempReg(regMaskTP mask = (regMaskTP)-1);
regNumber ExtractTempReg(regMaskTP mask = (regMaskTP)-1);
-#endif // !LEGACY_BACKEND
-
-#ifdef LEGACY_BACKEND
- regMaskSmall gtUsedRegs; // set of used (trashed) registers
-#endif // LEGACY_BACKEND
void SetVNsFromNode(GenTree* tree)
{
@@ -791,22 +722,10 @@ public:
(((flags) & (GTF_CALL | GTF_EXCEPT)) || (((flags) & (GTF_ASG | GTF_GLOB_REF)) == (GTF_ASG | GTF_GLOB_REF)))
#define GTF_REVERSE_OPS 0x00000020 // operand op2 should be evaluated before op1 (normally, op1 is evaluated first and op2 is evaluated second)
-
-#ifdef LEGACY_BACKEND
-#define GTF_REG_VAL 0x00000040 // operand is sitting in a register (or part of a TYP_LONG operand is sitting in a register)
-#else // !LEGACY_BACKEND
#define GTF_CONTAINED 0x00000040 // This node is contained (executed as part of its parent)
-#endif // !LEGACY_BACKEND
-
#define GTF_SPILLED 0x00000080 // the value has been spilled
-#ifdef LEGACY_BACKEND
-#define GTF_SPILLED_OPER 0x00000100 // op1 has been spilled
-#define GTF_SPILLED_OP2 0x00000200 // op2 has been spilled
-#define GTF_ZSF_SET 0x00000400 // the zero(ZF) and sign(SF) flags set to the operand
-#else // !LEGACY_BACKEND
#define GTF_NOREG_AT_USE 0x00000100 // tree node is in memory at the point of use
-#endif // !LEGACY_BACKEND
#define GTF_SET_FLAGS 0x00000800 // Requires that codegen for this node set the flags. Use gtSetFlags() to check this flag.
#define GTF_USE_FLAGS 0x00001000 // Indicates that this node uses the flags bits.
@@ -818,9 +737,6 @@ public:
#define GTF_NODE_MASK (GTF_COLON_COND)
#define GTF_BOOLEAN 0x00040000 // value is known to be 0/1
-#if CPU_HAS_BYTE_REGS && defined(LEGACY_BACKEND)
-#define GTF_SMALL_OK 0x00080000 // actual small int sufficient
-#endif
#define GTF_UNSIGNED 0x00100000 // With GT_CAST: the source operand is an unsigned type
// With operators: the specified node is an unsigned operator
@@ -864,6 +780,8 @@ public:
#define GTF_LIVENESS_MASK (GTF_VAR_DEF | GTF_VAR_USEASG | GTF_REG_BIRTH | GTF_VAR_DEATH)
+ // For additional flags for GT_CALL node see GTF_CALL_M_*
+
#define GTF_CALL_UNMANAGED 0x80000000 // GT_CALL -- direct call to unmanaged code
#define GTF_CALL_INLINE_CANDIDATE 0x40000000 // GT_CALL -- this call has been marked as an inline candidate
@@ -875,17 +793,6 @@ public:
#define GTF_CALL_NULLCHECK 0x08000000 // GT_CALL -- must check instance pointer for null
#define GTF_CALL_POP_ARGS 0x04000000 // GT_CALL -- caller pop arguments?
#define GTF_CALL_HOISTABLE 0x02000000 // GT_CALL -- call is hoistable
-#ifdef LEGACY_BACKEND
-#ifdef _TARGET_ARM_
-// The GTF_CALL_REG_SAVE flag indicates that the call preserves all integer registers. This is used for
-// the PollGC helper. However, since the PollGC helper on ARM follows the standard calling convention,
-// for that target we don't use this flag.
-#define GTF_CALL_REG_SAVE 0x00000000
-#else
-#define GTF_CALL_REG_SAVE 0x01000000 // GT_CALL -- This call preserves all integer regs
-#endif // _TARGET_ARM_
-#endif // LEGACY_BACKEND
- // For additional flags for GT_CALL node see GTF_CALL_M_*
#define GTF_NOP_DEATH 0x40000000 // GT_NOP -- operand dies here
@@ -933,12 +840,6 @@ public:
#define GTF_MUL_64RSLT 0x40000000 // GT_MUL -- produce 64-bit result
-#ifdef LEGACY_BACKEND
-#define GTF_MOD_INT_RESULT 0x80000000 // GT_MOD, -- the real tree represented by this
- // GT_UMOD node evaluates to an int even though its type is long.
- // The result is placed in the low member of the reg pair.
-#endif // LEGACY_BACKEND
-
#define GTF_RELOP_NAN_UN 0x80000000 // GT_<relop> -- Is branch taken if ops are NaN?
#define GTF_RELOP_JMP_USED 0x40000000 // GT_<relop> -- result of compare used for jump or ?:
#define GTF_RELOP_QMARK 0x20000000 // GT_<relop> -- the node is the condition for ?:
@@ -1282,7 +1183,7 @@ public:
bool OperIsPutArgSplit() const
{
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
return gtOper == GT_PUTARG_SPLIT;
#else
return false;
@@ -1311,7 +1212,7 @@ public:
bool OperIsMultiRegOp() const
{
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
if ((gtOper == GT_MUL_LONG) || (gtOper == GT_PUTARG_REG) || (gtOper == GT_BITCAST))
{
return true;
@@ -1505,11 +1406,7 @@ public:
static bool OperIsAssignment(genTreeOps gtOper)
{
-#ifdef LEGACY_BACKEND
- return (OperKind(gtOper) & GTK_ASGOP) != 0;
-#else
return gtOper == GT_ASG;
-#endif
}
bool OperIsAssignment() const
@@ -1520,9 +1417,7 @@ public:
static bool OperMayOverflow(genTreeOps gtOper)
{
return ((gtOper == GT_ADD) || (gtOper == GT_SUB) || (gtOper == GT_MUL) || (gtOper == GT_CAST)
-#ifdef LEGACY_BACKEND
- || (gtOper == GT_ASG_ADD) || (gtOper == GT_ASG_SUB)
-#elif !defined(_TARGET_64BIT_)
+#if !defined(_TARGET_64BIT_)
|| (gtOper == GT_ADD_HI) || (gtOper == GT_SUB_HI)
#endif
);
@@ -1622,7 +1517,7 @@ public:
// This is here for cleaner GT_LONG #ifdefs.
static bool OperIsLong(genTreeOps gtOper)
{
-#if defined(_TARGET_64BIT_) || defined(LEGACY_BACKEND)
+#if defined(_TARGET_64BIT_)
return false;
#else
return gtOper == GT_LONG;
@@ -1670,12 +1565,6 @@ public:
return OperIsBoundsCheck(OperGet());
}
-#ifdef LEGACY_BACKEND
- // Requires that "op" is an op= operator. Returns
- // the corresponding "op".
- static genTreeOps OpAsgToOper(genTreeOps op);
-#endif
-
#ifdef DEBUG
bool NullOp1Legal() const
{
@@ -1718,9 +1607,10 @@ public:
case GT_HWIntrinsic:
#endif // FEATURE_HW_INTRINSICS
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
case GT_PUTARG_REG:
-#endif // !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#endif // defined(_TARGET_ARM_)
+
return true;
default:
return false;
@@ -2007,36 +1897,11 @@ public:
// sets "*pIsEntire" to true if this assignment writes the full width of the local.
bool DefinesLocalAddr(Compiler* comp, unsigned width, GenTreeLclVarCommon** pLclVarTree, bool* pIsEntire);
-#ifdef LEGACY_BACKEND
- bool IsRegVar() const
- {
- return OperGet() == GT_REG_VAR ? true : false;
- }
- bool InReg() const
- {
- return (gtFlags & GTF_REG_VAL) ? true : false;
- }
- void SetInReg(bool value = true)
- {
- if (value == true)
- {
- gtFlags |= GTF_REG_VAL;
- }
- else
- {
- gtFlags &= ~GTF_REG_VAL;
- }
- }
- regNumber GetReg() const
- {
- return InReg() ? gtRegNum : REG_NA;
- }
-
-#else // !LEGACY_BACKEND
- // For the non-legacy backend, these are only used for dumping.
+ // These are only used for dumping.
// The gtRegNum is only valid in LIR, but the dumping methods are not easily
// modified to check this.
CLANG_FORMAT_COMMENT_ANCHOR;
+
#ifdef DEBUG
bool InReg() const
{
@@ -2067,8 +1932,6 @@ public:
ClearRegOptional();
}
-#endif // !LEGACY_BACKEND
-
bool IsRegVarDeath() const
{
assert(OperGet() == GT_REG_VAR);
@@ -2154,15 +2017,6 @@ public:
bool gtSetFlags() const;
bool gtRequestSetFlags();
-#ifdef LEGACY_BACKEND
- // Returns true if the codegen of this tree node
- // sets ZF and SF flags.
- bool gtSetZSFlags() const
- {
- return (gtFlags & GTF_ZSF_SET) != 0;
- }
-#endif
-
#ifdef DEBUG
bool gtIsValid64RsltMul();
static int gtDispFlags(unsigned flags, unsigned debugFlags);
@@ -2628,7 +2482,6 @@ struct GenTreePhysReg : public GenTree
#endif
};
-#ifndef LEGACY_BACKEND
// gtJumpTable - Switch Jump Table
//
// This node stores a DWORD constant that represents the
@@ -2650,7 +2503,6 @@ struct GenTreeJumpTable : public GenTreeIntConCommon
}
#endif // DEBUG
};
-#endif // !LEGACY_BACKEND
/* gtIntCon -- integer constant (GT_CNS_INT) */
struct GenTreeIntCon : public GenTreeIntConCommon
@@ -3163,11 +3015,10 @@ struct GenTreeFieldList : public GenTreeArgList
if (prevList == nullptr)
{
gtFlags |= GTF_FIELD_LIST_HEAD;
-#ifndef LEGACY_BACKEND
+
// A GT_FIELD_LIST head is always contained. Other nodes return false from IsValue()
// and should not be marked as contained.
SetContained();
-#endif
}
else
{
@@ -3369,10 +3220,6 @@ struct GenTreeCall final : public GenTree
// FEATURE_FIXED_OUT_ARGS was enabled, so this makes GenTreeCall 4 bytes bigger on x86).
CORINFO_SIG_INFO* callSig; // Used by tail calls and to register callsites with the EE
-#ifdef LEGACY_BACKEND
- regMaskTP gtCallRegUsedMask; // mask of registers used to pass parameters
-#endif // LEGACY_BACKEND
-
#if FEATURE_MULTIREG_RET
// State required to support multi-reg returning call nodes.
@@ -3634,10 +3481,7 @@ struct GenTreeCall final : public GenTree
#define GTF_CALL_M_NONVIRT_SAME_THIS 0x00000080 // GT_CALL -- callee "this" pointer is
// equal to caller this pointer (only for GTF_CALL_NONVIRT)
#define GTF_CALL_M_FRAME_VAR_DEATH 0x00000100 // GT_CALL -- the compLvFrameListRoot variable dies here (last use)
-
-#ifndef LEGACY_BACKEND
#define GTF_CALL_M_TAILCALL_VIA_HELPER 0x00000200 // GT_CALL -- call is a tail call dispatched via tail call JIT helper.
-#endif
#if FEATURE_TAILCALL_OPT
#define GTF_CALL_M_IMPLICIT_TAILCALL 0x00000400 // GT_CALL -- call is an opportunistic
@@ -3694,10 +3538,8 @@ struct GenTreeCall final : public GenTree
return (gtFlags & GTF_CALL_INLINE_CANDIDATE) != 0;
}
-#ifndef LEGACY_BACKEND
bool HasNonStandardAddedArgs(Compiler* compiler) const;
int GetNonStandardAddedArgCount(Compiler* compiler) const;
-#endif // !LEGACY_BACKEND
// Returns true if this call uses a retBuf argument and its calling convention
bool HasRetBufArg() const
@@ -3739,11 +3581,9 @@ struct GenTreeCall final : public GenTree
//
bool HasMultiRegRetVal() const
{
-#if defined(_TARGET_X86_) && !defined(LEGACY_BACKEND)
- // LEGACY_BACKEND does not use multi reg returns for calls with long return types
+#if defined(_TARGET_X86_)
return varTypeIsLong(gtType);
-#elif FEATURE_MULTIREG_RET && (defined(_TARGET_ARM_) && !defined(LEGACY_BACKEND))
- // LEGACY_BACKEND does not use multi reg returns for calls with long return types
+#elif FEATURE_MULTIREG_RET && defined(_TARGET_ARM_)
return varTypeIsLong(gtType) || (varTypeIsStruct(gtType) && !HasRetBufArg());
#elif FEATURE_MULTIREG_RET
return varTypeIsStruct(gtType) && !HasRetBufArg();
@@ -3780,17 +3620,10 @@ struct GenTreeCall final : public GenTree
return IsTailPrefixedCall() || IsImplicitTailCall();
}
-#ifndef LEGACY_BACKEND
bool IsTailCallViaHelper() const
{
return IsTailCall() && (gtCallMoreFlags & GTF_CALL_M_TAILCALL_VIA_HELPER);
}
-#else // LEGACY_BACKEND
- bool IsTailCallViaHelper() const
- {
- return true;
- }
-#endif // LEGACY_BACKEND
#if FEATURE_FASTTAILCALL
bool IsFastTailCall() const
@@ -3969,7 +3802,7 @@ struct GenTreeCmpXchg : public GenTree
#endif
};
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
struct GenTreeMultiRegOp : public GenTreeOp
{
regNumber gtOtherReg;
@@ -4124,7 +3957,7 @@ struct GenTreeMultiRegOp : public GenTreeOp
}
#endif
};
-#endif
+#endif // defined(_TARGET_ARM_)
struct GenTreeFptrVal : public GenTree
{
@@ -4147,12 +3980,6 @@ struct GenTreeFptrVal : public GenTree
/* gtQmark */
struct GenTreeQmark : public GenTreeOp
{
-#ifdef LEGACY_BACKEND
- // Livesets on entry to then and else subtrees
- VARSET_TP gtThenLiveSet;
- VARSET_TP gtElseLiveSet;
-#endif
-
// The "Compiler*" argument is not a DEBUGARG here because we use it to keep track of the set of
// (possible) QMark nodes.
GenTreeQmark(var_types type, GenTree* cond, GenTree* colonOp, class Compiler* comp);
@@ -4698,9 +4525,7 @@ struct GenTreeAddrMode : public GenTreeOp
unsigned gtScale; // The scale factor
-#ifndef LEGACY_BACKEND
private:
-#endif
// TODO-Cleanup: gtOffset should be changed to 'int' to match the getter function and avoid accidental
// zero extension to 64 bit. However, this is used by legacy code and initialized, via the offset
// parameter of the constructor, by Lowering::TryCreateAddrMode & CodeGenInterface::genCreateAddrMode.
@@ -5347,9 +5172,9 @@ struct GenTreePutArgStk : public GenTreeUnOp
unsigned gtNumberReferenceSlots; // Number of reference slots.
BYTE* gtGcPtrs; // gcPointers
-#elif !defined(LEGACY_BACKEND)
+#else // !FEATURE_PUT_STRUCT_ARG_STK
unsigned getArgSize();
-#endif // !LEGACY_BACKEND
+#endif // !FEATURE_PUT_STRUCT_ARG_STK
#if defined(DEBUG) || defined(UNIX_X86_ABI)
GenTreeCall* gtCall; // the call node to which this argument belongs
@@ -5362,7 +5187,7 @@ struct GenTreePutArgStk : public GenTreeUnOp
#endif
};
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
// Represent the struct argument: split value in register(s) and stack
struct GenTreePutArgSplit : public GenTreePutArgStk
{
@@ -5565,7 +5390,7 @@ struct GenTreePutArgSplit : public GenTreePutArgStk
}
#endif
};
-#endif // !LEGACY_BACKEND && _TARGET_ARM_
+#endif // _TARGET_ARM_
// Represents GT_COPY or GT_RELOAD node
struct GenTreeCopyOrReload : public GenTreeUnOp
@@ -5794,11 +5619,7 @@ struct GenTreeCC final : public GenTree
inline bool GenTree::OperIsBlkOp()
{
- return (((gtOper == GT_ASG) && varTypeIsStruct(gtOp.gtOp1))
-#ifndef LEGACY_BACKEND
- || (OperIsBlk() && (AsBlk()->Data() != nullptr))
-#endif
- );
+ return ((gtOper == GT_ASG) && varTypeIsStruct(gtOp.gtOp1)) || (OperIsBlk() && (AsBlk()->Data() != nullptr));
}
inline bool GenTree::OperIsDynBlkOp()
@@ -5807,12 +5628,10 @@ inline bool GenTree::OperIsDynBlkOp()
{
return gtGetOp1()->OperGet() == GT_DYN_BLK;
}
-#ifndef LEGACY_BACKEND
else if (gtOper == GT_STORE_DYN_BLK)
{
return true;
}
-#endif
return false;
}
@@ -5822,7 +5641,6 @@ inline bool GenTree::OperIsInitBlkOp()
{
return false;
}
-#ifndef LEGACY_BACKEND
GenTree* src;
if (gtOper == GT_ASG)
{
@@ -5832,9 +5650,6 @@ inline bool GenTree::OperIsInitBlkOp()
{
src = AsBlk()->Data()->gtSkipReloadOrCopy();
}
-#else // LEGACY_BACKEND
- GenTree* src = gtGetOp2();
-#endif // LEGACY_BACKEND
return src->OperIsInitVal() || src->OperIsConst();
}
@@ -5972,13 +5787,11 @@ inline bool GenTree::IsValidCallArgument()
}
if (OperIsFieldList())
{
-#if defined(LEGACY_BACKEND) || (!FEATURE_MULTIREG_ARGS && !FEATURE_PUT_STRUCT_ARG_STK)
- // Not allowed to have a GT_FIELD_LIST for an argument
- // unless we have a RyuJIT backend and FEATURE_MULTIREG_ARGS or FEATURE_PUT_STRUCT_ARG_STK
+#if !FEATURE_MULTIREG_ARGS && !FEATURE_PUT_STRUCT_ARG_STK
return false;
-#else // we have RyuJIT backend and FEATURE_MULTIREG_ARGS or FEATURE_PUT_STRUCT_ARG_STK
+#else // FEATURE_MULTIREG_ARGS or FEATURE_PUT_STRUCT_ARG_STK
#ifdef UNIX_AMD64_ABI
// For UNIX ABI we currently only allow a GT_FIELD_LIST of GT_LCL_FLDs nodes
@@ -6006,7 +5819,7 @@ inline bool GenTree::IsValidCallArgument()
// We allow this GT_FIELD_LIST as an argument
return true;
-#endif // FEATURE_MULTIREG_ARGS
+#endif // FEATURE_MULTIREG_ARGS or FEATURE_PUT_STRUCT_ARG_STK
}
// We don't have either kind of list, so it satisfies the invariant.
return true;
@@ -6053,21 +5866,6 @@ inline bool GenTree::RequiresNonNullOp2(genTreeOps oper)
case GT_ROR:
case GT_INDEX:
case GT_ASG:
-#ifdef LEGACY_BACKEND
- case GT_ASG_ADD:
- case GT_ASG_SUB:
- case GT_ASG_MUL:
- case GT_ASG_DIV:
- case GT_ASG_MOD:
- case GT_ASG_UDIV:
- case GT_ASG_UMOD:
- case GT_ASG_OR:
- case GT_ASG_XOR:
- case GT_ASG_AND:
- case GT_ASG_LSH:
- case GT_ASG_RSH:
- case GT_ASG_RSZ:
-#endif
case GT_EQ:
case GT_NE:
case GT_LT:
@@ -6204,7 +6002,7 @@ inline bool GenTree::IsMultiRegNode() const
return true;
}
-#if !defined(LEGACY_BACKEND) && defined(_TARGET_ARM_)
+#if defined(_TARGET_ARM_)
if (OperIsMultiRegOp() || OperIsPutArgSplit() || (gtOper == GT_COPY))
{
return true;
@@ -6323,13 +6121,11 @@ inline bool GenTreeBlk::HasGCPtr()
inline bool GenTree::isUsedFromSpillTemp() const
{
-#if !defined(LEGACY_BACKEND)
// If spilled and no reg at use, then it is used from the spill temp location rather than being reloaded.
if (((gtFlags & GTF_SPILLED) != 0) && ((gtFlags & GTF_NOREG_AT_USE) != 0))
{
return true;
}
-#endif //! LEGACY_BACKEND
return false;
}