Work towards objects stack allocation: moved allocation part of newobj-lowering into...
authorEgor Chesakov <t-egche@microsoft.com>
Thu, 21 Jul 2016 22:37:41 +0000 (15:37 -0700)
committerEgor Chesakov <t-egche@microsoft.com>
Tue, 9 Aug 2016 00:58:25 +0000 (17:58 -0700)
commite7332450dd8b0aaf22480caedbf73cc1561ed086
treea6e5231771d32dc49a75502a6c3a829bcca9dd64
parent0e64e6db6a9df07914fd851fa94b797ae6d8ce4d
Work towards objects stack allocation: moved allocation part of newobj-lowering into separate phase

1. Introduced `GT_ALLOCOBJ` node to mark places where object allocation happens
2. In `importer.cpp` changed lowering of allocation part of newobj instruction from an allocation helper call to a `GT_ALLOCOBJ` node creation
3. Created new phase `ObjectAllocator` (`PHASE_ALLOCATE_OBJECTS`) and put it right after dominator computing (we will need the information for escape analysis)
4. Current implementation of ObjectAllocator walks over all basic blocks having flag `BBF_HAS_NEWOBJ` set and replaces `GT_ALLOCOBJ` with  an allocation helper call

Commit migrated from https://github.com/dotnet/coreclr/commit/3c30aa1642ac52844aa3078fd6bc79a06f5c586a
15 files changed:
src/coreclr/src/jit/CMakeLists.txt
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/compphases.h
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/gentree.h
src/coreclr/src/jit/gtlist.h
src/coreclr/src/jit/gtstructs.h
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/jit.settings.targets
src/coreclr/src/jit/jitpch.h
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/objectalloc.cpp [new file with mode: 0644]
src/coreclr/src/jit/objectalloc.h [new file with mode: 0644]