JIT: don't reuse box temps when optimizing (#13703)
authorAndy Ayers <andya@microsoft.com>
Thu, 31 Aug 2017 00:36:07 +0000 (17:36 -0700)
committerGitHub <noreply@github.com>
Thu, 31 Aug 2017 00:36:07 +0000 (17:36 -0700)
commit86f8e7887eb73b94525f2a51462ef97d9c435fbf
treefb1ccdfa6f571cd64088afaeaa3797404a930f63
parent5495b45a74dc767e4a29dd30549fb54189b57734
JIT: don't reuse box temps when optimizing (#13703)

The importer reuses temps for different box operations that do not overlap.
This keeps the number of temps to a minimum and reduces prolog zeroing if the
temps end up untracked. But reuse prevents the importer from accurately typing
the temp.

So now, when optimizing, allocate a new temp for each box operation, and type
the temp with the type of the box.

This, along with a small update in `gtGetClassHandle` to obtain the box type,
enables some devirtualization of interface calls on boxes and will facilitate
future changes to optimize away boxes entirely (eg #5626).
src/jit/gentree.cpp
src/jit/importer.cpp