JIT: remove incremental ref count updates (dotnet/coreclr#19345)
authorAndy Ayers <andya@microsoft.com>
Mon, 20 Aug 2018 22:03:29 +0000 (15:03 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Aug 2018 22:03:29 +0000 (15:03 -0700)
commita5fdcc69f96adc328592b58a3ac814203a6f1831
treea80c2f1aa0fa04a51eccb8b2d83528e55c45d7d9
parent1ccfbc6d5edf2554291dacb955da31da19486382
JIT: remove incremental ref count updates (dotnet/coreclr#19345)

Remove almost all of the code in the jit that tries to maintain local ref
counts incrementally. Also remove `lvaSortAgain` and related machinery.

Explicitly sort locals before post-lower-liveness when optimizing to get the
best set of tracked locals.

Explicitly recount after post-lower liveness to get accurate counts after
dead stores. This can lead to tracked unreferenced arguments; tolerate this
during codegen.

Commit migrated from https://github.com/dotnet/coreclr/commit/895bfa452da4aeeda52447e76d9e9e987d68f331
19 files changed:
src/coreclr/src/jit/assertionprop.cpp
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/copyprop.cpp
src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/src/jit/earlyprop.cpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/lclvars.cpp
src/coreclr/src/jit/lir.cpp
src/coreclr/src/jit/liveness.cpp
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/optcse.cpp
src/coreclr/src/jit/optimizer.cpp
src/coreclr/src/jit/rationalize.cpp
src/coreclr/src/jit/regalloc.cpp