JIT: some lclvars related cleanup (dotnet/coreclr#19077)
authorAndy Ayers <andya@microsoft.com>
Mon, 23 Jul 2018 18:47:17 +0000 (11:47 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Jul 2018 18:47:17 +0000 (11:47 -0700)
commit31296c15cd5375f8e9e63424d91dbd540113da04
tree5bc36947fed2e510a451af038937ceac8239bbae
parent1b10901766ddb6b57e769e2dea04ad6e8e91160d
JIT: some lclvars related cleanup (dotnet/coreclr#19077)

Consolidate various compiler globals used when setting local var ref
counts by folding them into the visitor:
* lvaMarkRefsCurBlock
* lvaMarkRefsCurStmt
* lvaMarkRefsWeight

Remove the largely vestigial `lvPrefReg` and associated methods to set
or modify this field. Haven't verified but this is likely a remmant of
the legacy backend.

In the one remaning use (lcl var sorting predicates), swap in `lvIsRegArg`
instead, which gets most of the same cases.

Commit migrated from https://github.com/dotnet/coreclr/commit/456d22753b62b5e46b61fa13bef75847229d30ca
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/lclvars.cpp
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/target.h
src/coreclr/src/jit/utils.cpp