Start using local address nodes in the JIT frontend (#305)
authormikedn <onemihaid@hotmail.com>
Tue, 3 Dec 2019 03:03:16 +0000 (05:03 +0200)
committerCarol Eidt <carol.eidt@microsoft.com>
Tue, 3 Dec 2019 03:03:16 +0000 (19:03 -0800)
commitd0a9dc74befea8438d89e1b35f65f4f00b94b274
treec788e07ac7e117d60c4c9bc5f8a91c8a9006c351
parentdd816f3748be9d483799b9660b97a9d3e4180488
Start using local address nodes in the JIT frontend (#305)

* Add GenTreeLclFld getters/setters

Also change the offset type to uint16_t since the emitter does not support
offsets larger than 65535. The freed space will later be used to store a
class layout number to support struct typed GenTreeLclFld nodes.

* Track field sequences in LocalAddressVisitor

* Generate LCL_(VAR|FLD)_ADDR nodes in LocalAddressVisitor

This starts the process of moving away from ADDR nodes by generating
some LCL_(VAR|FLD)_ADDR nodes in LocalAddressVisitor. For now, these
nodes are generated in only 2 specific cases:
 - when a local address is a call argument
 - when a local address is the RHS of an assignment
There's not a lot going on with call arguments that are addresses and
the lack of some kind of forward substituion in the JIT means that the
RHS of an assignment will not move under a different node. The result
is that very few other changes are needed to support local address
nodes at this time. In particular, this avoids the need to change the
myriad of "is local address" checks and the GTF_GLOB_REF propagation
to indirections involving address exposed variables.

* Add TODO-ADDR comments
20 files changed:
src/coreclr/src/jit/codegenarm.cpp
src/coreclr/src/jit/codegenarm64.cpp
src/coreclr/src/jit/codegenarmarch.cpp
src/coreclr/src/jit/codegenlinear.cpp
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/src/jit/emitxarch.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/gentree.h
src/coreclr/src/jit/hwintrinsiccodegenxarch.cpp
src/coreclr/src/jit/instr.cpp
src/coreclr/src/jit/lclvars.cpp
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/rationalize.cpp
src/coreclr/src/jit/simdcodegenxarch.cpp
src/coreclr/src/jit/valuenum.cpp