summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikedn <onemihaid@hotmail.com>2017-12-20 23:31:53 +0200
committerSergey Andreenko <seandree@microsoft.com>2017-12-20 13:31:53 -0800
commit35608254eca65e1e3ddfec6b534d97715bd9dfd6 (patch)
treeb5a8689134a896e64ee1c8faa32be976aa5fca68
parent0500671ff7a6a9248771c25f9f9780858af6f6e4 (diff)
downloadcoreclr-35608254eca65e1e3ddfec6b534d97715bd9dfd6.tar.gz
coreclr-35608254eca65e1e3ddfec6b534d97715bd9dfd6.tar.bz2
coreclr-35608254eca65e1e3ddfec6b534d97715bd9dfd6.zip
Remove unused TYP_ARRAY/PTR/FUNC (#15529)
-rw-r--r--src/jit/codegenarmarch.cpp2
-rw-r--r--src/jit/codegenlegacy.cpp3
-rw-r--r--src/jit/codegenxarch.cpp2
-rw-r--r--src/jit/compiler.hpp2
-rw-r--r--src/jit/gcencode.cpp4
-rw-r--r--src/jit/regalloc.cpp3
-rw-r--r--src/jit/typelist.h4
-rw-r--r--src/jit/valuenum.cpp2
8 files changed, 3 insertions, 19 deletions
diff --git a/src/jit/codegenarmarch.cpp b/src/jit/codegenarmarch.cpp
index 74cbd01b01..deab3b67b9 100644
--- a/src/jit/codegenarmarch.cpp
+++ b/src/jit/codegenarmarch.cpp
@@ -2341,7 +2341,7 @@ void CodeGen::genCallInstruction(GenTreeCall* call)
{
assert(!varTypeIsStruct(call));
- if (call->gtType == TYP_REF || call->gtType == TYP_ARRAY)
+ if (call->gtType == TYP_REF)
{
retSize = EA_GCREF;
}
diff --git a/src/jit/codegenlegacy.cpp b/src/jit/codegenlegacy.cpp
index 7ccf422a92..effd4e6948 100644
--- a/src/jit/codegenlegacy.cpp
+++ b/src/jit/codegenlegacy.cpp
@@ -18479,7 +18479,7 @@ regMaskTP CodeGen::genCodeForCall(GenTreeCall* call, bool valUsed)
if (valUsed)
{
- if (call->gtType == TYP_REF || call->gtType == TYP_ARRAY)
+ if (call->gtType == TYP_REF)
{
retSize = EA_GCREF;
}
@@ -20040,7 +20040,6 @@ regMaskTP CodeGen::genCodeForCall(GenTreeCall* call, bool valUsed)
switch (call->gtType)
{
case TYP_REF:
- case TYP_ARRAY:
case TYP_BYREF:
gcInfo.gcMarkRegPtrVal(REG_INTRET, call->TypeGet());
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index 1c335221c0..746a85ef10 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -5270,7 +5270,7 @@ void CodeGen::genCallInstruction(GenTreeCall* call)
{
assert(!varTypeIsStruct(call));
- if (call->gtType == TYP_REF || call->gtType == TYP_ARRAY)
+ if (call->gtType == TYP_REF)
{
retSize = EA_GCREF;
}
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp
index 096c81d10a..83a7ff36d7 100644
--- a/src/jit/compiler.hpp
+++ b/src/jit/compiler.hpp
@@ -551,7 +551,6 @@ inline bool genTypeCanRepresentValue(var_types type, TValue value)
return FitsIn<INT64>(value);
case TYP_REF:
case TYP_BYREF:
- case TYP_ARRAY:
return FitsIn<UINT_PTR>(value);
default:
return false;
@@ -606,7 +605,6 @@ inline var_types genActualType(var_types type)
/* Spot check to make certain the table is in synch with the enum */
assert(genActualTypes[TYP_DOUBLE] == TYP_DOUBLE);
- assert(genActualTypes[TYP_FNC] == TYP_FNC);
assert(genActualTypes[TYP_REF] == TYP_REF);
assert((unsigned)type < sizeof(genActualTypes));
diff --git a/src/jit/gcencode.cpp b/src/jit/gcencode.cpp
index ea95e5cf13..6140773f36 100644
--- a/src/jit/gcencode.cpp
+++ b/src/jit/gcencode.cpp
@@ -44,7 +44,6 @@ ReturnKind GCInfo::getReturnKind()
switch (compiler->info.compRetType)
{
case TYP_REF:
- case TYP_ARRAY:
return RT_Object;
case TYP_BYREF:
return RT_ByRef;
@@ -55,9 +54,6 @@ ReturnKind GCInfo::getReturnKind()
switch (retType)
{
- case TYP_ARRAY:
- _ASSERTE(false && "TYP_ARRAY unexpected from getReturnTypeForStruct()");
- // fall through
case TYP_REF:
return RT_Object;
diff --git a/src/jit/regalloc.cpp b/src/jit/regalloc.cpp
index 564ea15453..7277b52a75 100644
--- a/src/jit/regalloc.cpp
+++ b/src/jit/regalloc.cpp
@@ -382,12 +382,9 @@ inline regMaskTP Compiler::genReturnRegForTree(GenTreePtr tree)
RBM_DOUBLERET, // TYP_DOUBLE,
RBM_INTRET, // TYP_REF,
RBM_INTRET, // TYP_BYREF,
- RBM_INTRET, // TYP_ARRAY,
RBM_ILLEGAL, // TYP_STRUCT,
RBM_ILLEGAL, // TYP_BLK,
RBM_ILLEGAL, // TYP_LCLBLK,
- RBM_ILLEGAL, // TYP_PTR,
- RBM_ILLEGAL, // TYP_FNC,
RBM_ILLEGAL, // TYP_UNKNOWN,
};
diff --git a/src/jit/typelist.h b/src/jit/typelist.h
index f7b803fec1..34ea543608 100644
--- a/src/jit/typelist.h
+++ b/src/jit/typelist.h
@@ -52,15 +52,11 @@ DEF_TP(DOUBLE ,"double" , TYP_DOUBLE, TI_DOUBLE,8, 8, 8, 2, 8, VTF_FLT,
DEF_TP(REF ,"ref" , TYP_REF, TI_REF, PS,GCS,GCS, PST,PS, VTF_ANY|VTF_GCR|VTF_I,TYPE_REF_PTR)
DEF_TP(BYREF ,"byref" , TYP_BYREF, TI_ERROR,PS,BRS,BRS, PST,PS, VTF_ANY|VTF_BYR|VTF_I,TYPE_REF_BYR)
-DEF_TP(ARRAY ,"array" , TYP_REF, TI_REF, PS,GCS,GCS, PST,PS, VTF_ANY|VTF_GCR|VTF_I,TYPE_REF_PTR)
DEF_TP(STRUCT ,"struct" , TYP_STRUCT, TI_STRUCT,0, 0, 0, 1, 4, VTF_S, TYPE_REF_STC)
DEF_TP(BLK ,"blk" , TYP_BLK, TI_ERROR, 0, 0, 0, 1, 4, VTF_ANY, 0 ) // blob of memory
DEF_TP(LCLBLK ,"lclBlk" , TYP_LCLBLK, TI_ERROR, 0, 0, 0, 1, 4, VTF_ANY, 0 ) // preallocated memory for locspace
-DEF_TP(PTR ,"pointer" , TYP_PTR, TI_ERROR,PS, PS, PS, PST,PS, VTF_ANY|VTF_I, TYPE_REF_PTR) // (not currently used)
-DEF_TP(FNC ,"function", TYP_FNC, TI_ERROR, 0, PS, PS, 0, 0, VTF_ANY|VTF_I, 0 )
-
#ifdef FEATURE_SIMD
// Amd64: The size and alignment of SIMD vector varies at JIT time based on whether target arch supports AVX or SSE2.
DEF_TP(SIMD8 ,"simd8" , TYP_SIMD8, TI_STRUCT, 8, 8, 8, 2, 8, VTF_S, TYPE_REF_STC)
diff --git a/src/jit/valuenum.cpp b/src/jit/valuenum.cpp
index e2fc02f109..6189369db0 100644
--- a/src/jit/valuenum.cpp
+++ b/src/jit/valuenum.cpp
@@ -918,7 +918,6 @@ ValueNum ValueNumStore::VNZeroForType(var_types typ)
case TYP_DOUBLE:
return VNForDoubleCon(0.0);
case TYP_REF:
- case TYP_ARRAY:
return VNForNull();
case TYP_BYREF:
return VNForByrefCon(0);
@@ -3909,7 +3908,6 @@ void ValueNumStore::vnDump(Compiler* comp, ValueNum vn, bool isPtr)
printf("DblCns[%f]", ConstantValue<double>(vn));
break;
case TYP_REF:
- case TYP_ARRAY:
if (vn == VNForNull())
{
printf("null");