Jit: use class attributes check to reduce GC layout asks
authorAndy Ayers <andya@microsoft.com>
Thu, 20 Oct 2016 20:48:22 +0000 (13:48 -0700)
committerAndy Ayers <andya@microsoft.com>
Fri, 21 Oct 2016 00:38:28 +0000 (17:38 -0700)
commit77ed974d759b488a266cea54a1c4278c2664d130
treef998c8a7945266ad1358d0a505a311cafa4b16f4
parent0e4869a6930cfb6278b51130bbccfc323ef61053
Jit: use class attributes check to reduce GC layout asks

In `impNormStructType`, check the class attributes for absence of gc
pointers as a quick way of identifying likely SIMD types. Use SIMD max
and min size as a secondary screen.

Only request GC layout if the caller has asked for it.

This should reduce the number of times the jit makes the somewhat
costly ask for struct GC layouts.

Note that typed byrefs require special handling; also the class
attributes may sometimes report GC pointers when in fact there are none.

No diffs in System.Private.CoreLib codegen; no diffs seen in desktop
SPMI testing.

Closes #7625.
src/jit/importer.cpp