diff options
author | Andy Ayers <andya@microsoft.com> | 2017-03-14 19:45:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-14 19:45:10 -0700 |
commit | 3ea5447c9b090e621aed9e20a580178e97dabf8f (patch) | |
tree | 03cd63aad8c71426e6440f70322b59013446b840 /src/jit/compiler.h | |
parent | b178cb3fa54304cde31c15696b9262dcb4b655b1 (diff) | |
download | coreclr-3ea5447c9b090e621aed9e20a580178e97dabf8f.tar.gz coreclr-3ea5447c9b090e621aed9e20a580178e97dabf8f.tar.bz2 coreclr-3ea5447c9b090e621aed9e20a580178e97dabf8f.zip |
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.
Diffstat (limited to 'src/jit/compiler.h')
-rw-r--r-- | src/jit/compiler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h index da5ebbc484..7baba5da23 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -2188,6 +2188,8 @@ public: CORINFO_CLASS_HANDLE gtGetStructHandleIfPresent(GenTreePtr tree); // Get the handle, and assert if not found. CORINFO_CLASS_HANDLE gtGetStructHandle(GenTreePtr tree); + // Get the handle for a ref type. + CORINFO_CLASS_HANDLE gtGetClassHandle(GenTreePtr tree, bool* isExact, bool* isNonNull); //------------------------------------------------------------------------- // Functions to display the trees |