JIT: improve types for single def locals and temps (dotnet/coreclr#10471)
authorAndy Ayers <andya@microsoft.com>
Wed, 29 Mar 2017 21:16:46 +0000 (14:16 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Mar 2017 21:16:46 +0000 (14:16 -0700)
commit686cd464a88826d47371792babba49980a1e1fc3
treee99aad66d4696e2e039e7b66add18ab1a336fc5a
parentb28735cc94aaaa2c1974130f55f212ac6d0ddfbe
JIT: improve types for single def locals and temps (dotnet/coreclr#10471)

* JIT: improve types for single def locals and temps

Track whether a local has a single definition, and if so, if it has
a reference type, try and update its type from the declared type to
a better type taken from the value being assigned to the local.

Obtain types for some of the 'short-lived' ref type temps that should
have a single definition. Use both the tree and the eval stack as sources
of type information (the latter can be phased out if/when all tree nodes
can return rich type information).

Refactor the code that sets or updates lvClassHnd into utilities
to provide better auditing of type flow and make the set/update process
a bit more rigorous.

Cleanup the code that passes argument values a bit by commoning redundant
argument lookup expressions.

Commit migrated from https://github.com/dotnet/coreclr/commit/e99037f5c750b52016b940f964cee920b1579ff8
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/inline.h
src/coreclr/src/jit/lclvars.cpp