Skip to content

Commit b35e96b

Browse files
authored
JIT: run extra SPMI queries for arrays (#111293)
Work in anticipation of stack allocation of arrays, so that we can get decent diffs via SPMI.
1 parent e68313e commit b35e96b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/coreclr/jit/importer.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9699,6 +9699,22 @@ void Compiler::impImportBlockCode(BasicBlock* block)
96999699
/* Push the result of the call on the stack */
97009700

97019701
impPushOnStack(gtNewLclvNode(lclNum, TYP_REF), tiRetVal);
9702+
9703+
#ifdef DEBUG
9704+
// Under SPMI, look up the array element type class handle
9705+
// and layout info (for arrays of structs)
9706+
//
9707+
if (JitConfig.EnableExtraSuperPmiQueries())
9708+
{
9709+
CORINFO_CLASS_HANDLE elemClsHnd = NO_CLASS_HANDLE;
9710+
CorInfoType elemCorType = info.compCompHnd->getChildType(resolvedToken.hClass, &elemClsHnd);
9711+
var_types elemType = JITtype2varType(elemCorType);
9712+
if (elemType == TYP_STRUCT)
9713+
{
9714+
typGetObjLayout(elemClsHnd);
9715+
}
9716+
}
9717+
#endif
97029718
}
97039719
else
97049720
{

0 commit comments

Comments
 (0)