Remove GTF_ADDR_ONSTACK and IsVarAddr.
authorEugene Rozenfeld <erozen@microsoft.com>
Tue, 29 Jan 2019 19:26:49 +0000 (11:26 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Wed, 30 Jan 2019 22:10:49 +0000 (14:10 -0800)
commit4070994640bcc2c4c138b6f695d3fce14ea3efe7
tree3f2bc61d4bec7bc503fb0c7fda3fed92898a1fc3
parent91e1ffccc38fc87f6f496eb056396a1b775f08af
Remove GTF_ADDR_ONSTACK and IsVarAddr.

IsVarAddr was checking GTF_ADDR_ONSTACK  to determine if
the GT_ADDR node is an address of a local. This change removes both
GTF_ADDR_ONSTACK and  IsVarAddr and uses IsLocalAdrExpr instead.
IsLocalAddrExpr uses opcodes to determine if GT_ADDR node is
a local address.

GTF_ADDR_ONSTACK flag is ancient, added before 2002 so I couldn't find
the checkin that introduced it.

I changed the assert to a check and an assignment since simplifications
inside fgMorphArgs between
https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3709
(which causes https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3057)
and
https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3790
may result in more GT_ADDR nodes recognized by IsLocalAdrExpr.

x86 and x64 pmi frameworks had no code diffs and some gcinfo reductions
(15 methods with gcinfo diffs in x86).

Fixes #22190.
src/jit/codegenarmarch.cpp
src/jit/codegenxarch.cpp
src/jit/compiler.cpp
src/jit/compiler.hpp
src/jit/gentree.cpp
src/jit/gentree.h
src/jit/importer.cpp
src/jit/morph.cpp