summaryrefslogtreecommitdiff
path: root/src/jit/gentree.h
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2019-01-09 11:07:20 -0800
committerGitHub <noreply@github.com>2019-01-09 11:07:20 -0800
commit867d7c93ea9dbabfc7262e747ecb3823983606e3 (patch)
tree7cfaa97f495d2ca2a75fca47901d2802bb096d6a /src/jit/gentree.h
parent03e2c029f7bbd36e06bcad3822b1dd3866772170 (diff)
parent4b68c59aa18e0af3c770e1bdf22993a252d19a46 (diff)
downloadcoreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.tar.gz
coreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.tar.bz2
coreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.zip
Merge pull request #20772 from mikedn/ir-cleanup
Some IR cleanup
Diffstat (limited to 'src/jit/gentree.h')
-rw-r--r--src/jit/gentree.h70
1 files changed, 11 insertions, 59 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 39c9e678bd..2405e822ce 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -128,10 +128,6 @@ enum genTreeKinds
/*****************************************************************************/
-#define SMALL_TREE_NODES 1
-
-/*****************************************************************************/
-
enum gtCallTypes : BYTE
{
CT_USER_FUNC, // User function
@@ -1748,7 +1744,6 @@ public:
bool IsAddWithI32Const(GenTree** addr, int* offset);
public:
-#if SMALL_TREE_NODES
static unsigned char s_gtNodeSizes[];
#if NODEBASH_STATS || MEASURE_NODE_SIZE || COUNT_AST_OPERS
static unsigned char s_gtTrueSizes[];
@@ -1756,7 +1751,6 @@ public:
#if COUNT_AST_OPERS
static LONG s_gtNodeCounts[];
#endif
-#endif // SMALL_TREE_NODES
static void InitNodeSize();
@@ -1780,7 +1774,7 @@ public:
static const char* OpName(genTreeOps op);
#endif
-#if MEASURE_NODE_SIZE && SMALL_TREE_NODES
+#if MEASURE_NODE_SIZE
static const char* OpStructName(genTreeOps op);
#endif
@@ -1818,7 +1812,6 @@ public:
}
}
-#if SMALL_TREE_NODES
#if NODEBASH_STATS
static void RecordOperBashing(genTreeOps operOld, genTreeOps operNew);
static void ReportOperBashing(FILE* fp);
@@ -1830,7 +1823,6 @@ public:
{ /* do nothing */
}
#endif
-#endif
bool IsLocal() const
{
@@ -2496,28 +2488,6 @@ struct GenTreePhysReg : public GenTree
#endif
};
-// gtJumpTable - Switch Jump Table
-//
-// This node stores a DWORD constant that represents the
-// absolute address of a jump table for switches. The code
-// generator uses this table to code the destination for every case
-// in an array of addresses which starting position is stored in
-// this constant.
-struct GenTreeJumpTable : public GenTreeIntConCommon
-{
- ssize_t gtJumpTableAddr;
-
- GenTreeJumpTable(var_types type DEBUGARG(bool largeNode = false))
- : GenTreeIntConCommon(GT_JMPTABLE, type DEBUGARG(largeNode))
- {
- }
-#if DEBUGGABLE_GENTREE
- GenTreeJumpTable() : GenTreeIntConCommon()
- {
- }
-#endif // DEBUG
-};
-
/* gtIntCon -- integer constant (GT_CNS_INT) */
struct GenTreeIntCon : public GenTreeIntConCommon
{
@@ -2755,15 +2725,18 @@ public:
struct GenTreeLclVar : public GenTreeLclVarCommon
{
- IL_OFFSET gtLclILoffs; // instr offset of ref (only for debug info)
+ INDEBUG(IL_OFFSET gtLclILoffs;) // instr offset of ref (only for JIT dumps)
- GenTreeLclVar(var_types type, unsigned lclNum, IL_OFFSET ilOffs DEBUGARG(bool largeNode = false))
- : GenTreeLclVarCommon(GT_LCL_VAR, type, lclNum DEBUGARG(largeNode)), gtLclILoffs(ilOffs)
+ GenTreeLclVar(var_types type,
+ unsigned lclNum DEBUGARG(IL_OFFSET ilOffs = BAD_IL_OFFSET) DEBUGARG(bool largeNode = false))
+ : GenTreeLclVarCommon(GT_LCL_VAR, type, lclNum DEBUGARG(largeNode)) DEBUGARG(gtLclILoffs(ilOffs))
{
}
- GenTreeLclVar(genTreeOps oper, var_types type, unsigned lclNum, IL_OFFSET ilOffs DEBUGARG(bool largeNode = false))
- : GenTreeLclVarCommon(oper, type, lclNum DEBUGARG(largeNode)), gtLclILoffs(ilOffs)
+ GenTreeLclVar(genTreeOps oper,
+ var_types type,
+ unsigned lclNum DEBUGARG(IL_OFFSET ilOffs = BAD_IL_OFFSET) DEBUGARG(bool largeNode = false))
+ : GenTreeLclVarCommon(oper, type, lclNum DEBUGARG(largeNode)) DEBUGARG(gtLclILoffs(ilOffs))
{
assert(OperIsLocal(oper) || OperIsLocalAddr(oper));
}
@@ -4190,7 +4163,7 @@ struct GenTreeIndexAddr : public GenTreeOp
CORINFO_CLASS_HANDLE gtStructElemClass; // If the element type is a struct, this is the struct type.
- GenTree* gtIndRngFailBB; // Label to jump to for array-index-out-of-range
+ BasicBlock* gtIndRngFailBB; // Basic block to jump to for array-index-out-of-range
var_types gtElemType; // The element type of the array.
unsigned gtElemSize; // size of elements in the array
@@ -4276,7 +4249,7 @@ struct GenTreeBoundsChk : public GenTree
GenTree* gtIndex; // The index expression.
GenTree* gtArrLen; // An expression for the length of the array being indexed.
- GenTree* gtIndRngFailBB; // Label to jump to for array-index-out-of-range
+ BasicBlock* gtIndRngFailBB; // Basic block to jump to for array-index-out-of-range
SpecialCodeKind gtThrowKind; // Kind of throw block to branch to on failure
GenTreeBoundsChk(genTreeOps oper, var_types type, GenTree* index, GenTree* arrLen, SpecialCodeKind kind)
@@ -4999,22 +4972,6 @@ struct GenTreeArgPlace : public GenTree
#endif
};
-/* gtLabel -- code label target (GT_LABEL) */
-
-struct GenTreeLabel : public GenTree
-{
- BasicBlock* gtLabBB;
-
- GenTreeLabel(BasicBlock* bb) : GenTree(GT_LABEL, TYP_VOID), gtLabBB(bb)
- {
- }
-#if DEBUGGABLE_GENTREE
- GenTreeLabel() : GenTree()
- {
- }
-#endif
-};
-
/* gtPhiArg -- phi node rhs argument, var = phi(phiarg, phiarg, phiarg...); GT_PHI_ARG */
struct GenTreePhiArg : public GenTreeLclVarCommon
{
@@ -6306,13 +6263,8 @@ inline bool GenTree::isUsedFromSpillTemp() const
/*****************************************************************************/
-#if SMALL_TREE_NODES
-
// In debug, on some platforms (e.g., when LATE_DISASM is defined), GenTreeIntCon is bigger than GenTreeLclFld.
const size_t TREE_NODE_SZ_SMALL = max(sizeof(GenTreeIntCon), sizeof(GenTreeLclFld));
-
-#endif // SMALL_TREE_NODES
-
const size_t TREE_NODE_SZ_LARGE = sizeof(GenTreeCall);
enum varRefKinds