diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 7632c6540da98c..bcbb73fdf5c036 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -1377,24 +1377,6 @@ class LinearScanInterface LinearScanInterface* getLinearScanAllocator(Compiler* comp); -// Information about arrays: their element type and size, and the offset of the first element. -struct ArrayInfo -{ - var_types m_elemType; - CORINFO_CLASS_HANDLE m_elemStructType; - unsigned m_elemSize; - unsigned m_elemOffset; - - ArrayInfo() : m_elemType(TYP_UNDEF), m_elemStructType(nullptr), m_elemSize(0), m_elemOffset(0) - { - } - - ArrayInfo(var_types elemType, unsigned elemSize, unsigned elemOffset, CORINFO_CLASS_HANDLE elemStructType) - : m_elemType(elemType), m_elemStructType(elemStructType), m_elemSize(elemSize), m_elemOffset(elemOffset) - { - } -}; - // This enumeration names the phases into which we divide compilation. The phases should completely // partition a compilation. enum Phases diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 0b540489e68091..6d05330a084820 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -9791,22 +9791,6 @@ void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, _In_ _In_opt_ printf("<%S, %u>", shortClassName, classSize); } } - else if (tree->OperIsIndir()) - { - ArrayInfo arrInfo; - if (TryGetArrayInfo(tree->AsIndir(), &arrInfo)) - { - if (varTypeIsStruct(arrInfo.m_elemType)) - { - CORINFO_CLASS_HANDLE clsHnd = arrInfo.m_elemStructType; - // We could create a layout with `typGetObjLayout(asInd->gtStructElemClass)` but we - // don't want to affect the layout table. - const unsigned classSize = info.compCompHnd->getClassSize(clsHnd); - const char16_t* shortClassName = eeGetShortClassName(clsHnd); - printf("<%S, %u>", shortClassName, classSize); - } - } - } if (layout != nullptr) { @@ -9814,6 +9798,18 @@ void Compiler::gtDispNode(GenTree* tree, IndentStack* indentStack, _In_ _In_opt_ } } + if (tree->OperIs(GT_ARR_ADDR)) + { + if (tree->AsArrAddr()->GetElemClassHandle() != NO_CLASS_HANDLE) + { + printf("%S[]", eeGetShortClassName(tree->AsArrAddr()->GetElemClassHandle())); + } + else + { + printf("%s[]", varTypeName(tree->AsArrAddr()->GetElemType())); + } + } + if (tree->gtOper == GT_LCL_VAR || tree->gtOper == GT_STORE_LCL_VAR) { LclVarDsc* varDsc = lvaGetDesc(tree->AsLclVarCommon());