JIT: streamline temp usage for returns (#20640)
authorAndy Ayers <andya@microsoft.com>
Mon, 29 Oct 2018 23:11:53 +0000 (16:11 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Oct 2018 23:11:53 +0000 (16:11 -0700)
commitccc18a6352c7a6232606131424c0377ea3529991
tree1481a71638bc2add48809936543d2aad25055123
parent17879dfcda03bb47571daab2addb318ef47b04d9
JIT: streamline temp usage for returns (#20640)

If the jit decides it needs a return spill temp, and the return value
has already been spilled to a single-def temp, re-use the existing
for the return temp rather than creating a new one.

In conjunction with #20553 this allows late devirtualization for calls where
the object in the virtual call is the result of an inline that provides
a better type, and the objected formerly reached the call via one or more
intermediate temps.

Closes #15873.
src/jit/flowgraph.cpp
src/jit/importer.cpp
src/jit/inline.h
tests/src/JIT/opt/Devirtualization/arraypool.cs [new file with mode: 0644]
tests/src/JIT/opt/Devirtualization/arraypool.csproj [new file with mode: 0644]
tests/src/JIT/opt/Devirtualization/late1.cs [new file with mode: 0644]
tests/src/JIT/opt/Devirtualization/late1.csproj [new file with mode: 0644]