Maintain `LIR::IsUnusedValue` in the backend.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 21 Jun 2017 01:22:45 +0000 (18:22 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Sat, 24 Jun 2017 21:10:19 +0000 (14:10 -0700)
commit34a4ba15cf73140d2aa017eef8cf00fb21319bea
tree258a7a7c6895e14613ce697c5f165f8cb5367722
parent7cee3174439fad5fc99f58337fab9898b4809a88
Maintain `LIR::IsUnusedValue` in the backend.

This flag indicates whether or not the SDSU temp produced by a node is
ever read. This information is needed by the register allocator, but is
also useful in other parts of the compiler (for example, `TryGetUse` can
return immediately if this flag is set). Setting this flag properly in
rationalize and maintaining it through decomposition and lowering allows
us to remove an IR walk immediately prior to LSRA.

Commit migrated from https://github.com/dotnet/coreclr/commit/04668c8a76da2b1ee07b48e00ae0376ddfbad960
src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/lir.cpp
src/coreclr/src/jit/lir.h
src/coreclr/src/jit/liveness.cpp
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/lsra.cpp
src/coreclr/src/jit/rationalize.cpp