JIT: handle implicit local var references via local var attribute bit (dotnet/coreclr...
authorAndy Ayers <andya@microsoft.com>
Fri, 20 Jul 2018 21:56:09 +0000 (14:56 -0700)
committerGitHub <noreply@github.com>
Fri, 20 Jul 2018 21:56:09 +0000 (14:56 -0700)
commit564d451780a542cae31a134900817ccd4c0a0b5f
tree2e252f87cc8bbd3ea623d9b3aa4cadcbbfee2c18
parent08c8f98b2f5f3eb24892400b95241fa85aee12e8
JIT: handle implicit local var references via local var attribute bit (dotnet/coreclr#19012)

Instead of relying on ref count bumps, add a new attribute bit to local
vars to indicate that they may have implicit references (prolog, epilog,
gc, eh) and may not have any IR references.

Use this attribute bit to ensure that the ref count and weighted ref count for
such variables are never reported as zero, and as a result that these variables
end up being allocated and reportable.

This is another preparatory step for dotnet/coreclr#18969 and frees the jit to recompute
explicit ref counts via an IR scan without having to special case the counts
for these variables.

The jit can no longer describe implicit counts other than 1 and implicit weights
otehr than BB_UNITY_WEIGHT, but that currently doesn't seem to be very important.

The new bit fits into an existing padding void so LclVarDsc remains at 128 bytes
(for windows x64).

Commit migrated from https://github.com/dotnet/coreclr/commit/699028a7a033991f01a72211a88a534ef1360c3a
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/lclvars.cpp
src/coreclr/src/jit/liveness.cpp