JIT: preliminaries to improve types (#10172)
authorAndy Ayers <andya@microsoft.com>
Wed, 15 Mar 2017 02:45:10 +0000 (19:45 -0700)
committerGitHub <noreply@github.com>
Wed, 15 Mar 2017 02:45:10 +0000 (19:45 -0700)
commit3ea5447c9b090e621aed9e20a580178e97dabf8f
tree03cd63aad8c71426e6440f70322b59013446b840
parentb178cb3fa54304cde31c15696b9262dcb4b655b1
JIT: preliminaries to improve types (#10172)

Refactor the logic in `impDevirtualizeCall` so that the part that determines
the type of a tree for ref types is now a new utility method that can be called
elsewhere.

Update the utility to examine calls more closely. For inline candidates that
return shared types, try and use the context to get to the unshared version of the
type. For calls that are not inline candidates, look at the type in the signature
available to the jit w/o context.

Call the utility when we've created a temp for an inlinee's argument and the
argument is not modified in the inlinee body. If we already thought we knew the
type of the temp exactly, ensure that this new information agrees.

Rework the logic in `impDevirtualizeCall` in anticipation of interface call
devirtualization. Update the diagnostic stream to indicate the kind of call
devirtualized and the primary reason why devirtualization happened.
Avoid fetching class and method names unless they're going to be used. Likewise
try not to fetch attributes if we already have them on hand.
src/jit/compiler.h
src/jit/flowgraph.cpp
src/jit/gentree.cpp
src/jit/importer.cpp