Refactor init/copy block codegen (dotnet/coreclr#27035)
authormikedn <onemihaid@hotmail.com>
Wed, 16 Oct 2019 18:42:45 +0000 (21:42 +0300)
committerSergey Andreenko <seandree@microsoft.com>
Wed, 16 Oct 2019 18:42:45 +0000 (11:42 -0700)
commita96a8c62385669b2db63dc043bfcab2500b91c13
treeb56146a1993ee20cce626395033997b45de02800
parent8fe52d9dfa549a4a654929a919808db7bf19af5d
Refactor init/copy block codegen (dotnet/coreclr#27035)

* Delete INITBLK/CPBLK_STOS_LIMIT

* Treat 0 sized block ops as unrolled

Normally 0 sized block ops should be simply removed during lowering. But these are rare enough that adding special code to deal with them is questionable.

Instead unroll such block ops, the unroll codegen simply won't generate any code for a 0 sized block op. Of course, some registers will still be allocated.

* Cleanup BuildBlockStore

* BlkOpKindHelper is not available on x86

* Use GT_STORE_BLK/unroll consistently

Non-GC GT_STORE_OBJ nodes were changed to GT_STORE_BLK in block copy ops
but not in block init ops. Since block init is effectvely non-GC it is
preferable to be consistent and change to GT_STORE_BLK in both cases.

Commit migrated from https://github.com/dotnet/coreclr/commit/8370e676f2d558fc20b5920d3a424c4e419d5e3a
src/coreclr/src/jit/codegenarmarch.cpp
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/gentree.h
src/coreclr/src/jit/lowerarmarch.cpp
src/coreclr/src/jit/lowerxarch.cpp
src/coreclr/src/jit/lsraarmarch.cpp
src/coreclr/src/jit/lsrabuild.cpp
src/coreclr/src/jit/lsraxarch.cpp
src/coreclr/src/jit/target.h