From 799659491070f7ca56e59f1e260765d92b866574 Mon Sep 17 00:00:00 2001 From: Mike Danes Date: Sat, 7 Oct 2017 20:17:19 +0300 Subject: [PATCH] Removed unused opers and code * GT_DIV_HI and GT_MOD_HI are not used anywhere * genCodeForBinary doesn't handle GT_MUL_LONG * OperIsHigh is not used anywhere --- src/jit/codegenxarch.cpp | 3 +-- src/jit/decomposelongs.cpp | 6 ------ src/jit/gentree.h | 21 --------------------- src/jit/gtlist.h | 2 -- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp index bbac381..10d640b 100644 --- a/src/jit/codegenxarch.cpp +++ b/src/jit/codegenxarch.cpp @@ -808,8 +808,7 @@ void CodeGen::genCodeForBinary(GenTree* treeNode) assert(oper == GT_OR || oper == GT_XOR || oper == GT_AND || oper == GT_ADD || oper == GT_SUB); #else // !defined(_TARGET_64BIT_) assert(oper == GT_OR || oper == GT_XOR || oper == GT_AND || oper == GT_ADD_LO || oper == GT_ADD_HI || - oper == GT_SUB_LO || oper == GT_SUB_HI || oper == GT_MUL_LONG || oper == GT_DIV_HI || oper == GT_MOD_HI || - oper == GT_ADD || oper == GT_SUB); + oper == GT_SUB_LO || oper == GT_SUB_HI || oper == GT_ADD || oper == GT_SUB); #endif // !defined(_TARGET_64BIT_) GenTreePtr op1 = treeNode->gtGetOp1(); diff --git a/src/jit/decomposelongs.cpp b/src/jit/decomposelongs.cpp index 174bba2..1a78533 100644 --- a/src/jit/decomposelongs.cpp +++ b/src/jit/decomposelongs.cpp @@ -1980,12 +1980,6 @@ genTreeOps DecomposeLongs::GetHiOper(genTreeOps oper) case GT_SUB: return GT_SUB_HI; break; - case GT_DIV: - return GT_DIV_HI; - break; - case GT_MOD: - return GT_MOD_HI; - break; case GT_OR: return GT_OR; break; diff --git a/src/jit/gentree.h b/src/jit/gentree.h index 77976f0..3912763 100644 --- a/src/jit/gentree.h +++ b/src/jit/gentree.h @@ -1454,27 +1454,6 @@ public: } #endif // _TARGET_XARCH_ -#if !defined(LEGACY_BACKEND) && !defined(_TARGET_64BIT_) - static bool OperIsHigh(genTreeOps gtOper) - { - switch (gtOper) - { - case GT_ADD_HI: - case GT_SUB_HI: - case GT_DIV_HI: - case GT_MOD_HI: - return true; - default: - return false; - } - } - - bool OperIsHigh() const - { - return OperIsHigh(OperGet()); - } -#endif // !defined(LEGACY_BACKEND) && !defined(_TARGET_64BIT_) - static bool OperIsUnary(genTreeOps gtOper) { return (OperKind(gtOper) & GTK_UNOP) != 0; diff --git a/src/jit/gtlist.h b/src/jit/gtlist.h index 9ba21a3..6ca636d 100644 --- a/src/jit/gtlist.h +++ b/src/jit/gtlist.h @@ -192,8 +192,6 @@ GTNODE(ADD_LO , GenTreeOp ,1,GTK_BINOP) GTNODE(ADD_HI , GenTreeOp ,1,GTK_BINOP) GTNODE(SUB_LO , GenTreeOp ,0,GTK_BINOP) GTNODE(SUB_HI , GenTreeOp ,0,GTK_BINOP) -GTNODE(DIV_HI , GenTreeOp ,0,GTK_BINOP) -GTNODE(MOD_HI , GenTreeOp ,0,GTK_BINOP) // A mul that returns the 2N bit result of an NxN multiply. This op is used for // multiplies that take two ints and return a long result. All other multiplies -- 2.7.4