Remove redundant zero-initialization of struct temps with GC fields. (dotnet/coreclr...
authorEugene Rozenfeld <erozen@microsoft.com>
Wed, 13 Sep 2017 00:15:08 +0000 (17:15 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2017 00:15:08 +0000 (17:15 -0700)
commit775ed3b3ee8760cf50cfeb0d156a2acf8742370d
tree2453a04c615ea4476f3a8e1c9dd3b1297169a1e1
parent14348ecebd1a3c598241272f375fc8cb27f4527b
Remove redundant  zero-initialization of struct temps with GC fields. (dotnet/coreclr#13868)

Remove redundant  zero-initialization of struct temps with GC fields.

Structs with GC pointer fields are fully zero-initialized in the prolog if compInitMem is true.
Therefore, we don't need to insert zero-initialization for the result of newobj or for inlinee locals
when they are structs with GC pointer fields and the basic bock is not in a loop.

Commit migrated from https://github.com/dotnet/coreclr/commit/c77ad480298300b655ced317bf25b1fe4f27ceb3
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/morph.cpp
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_13822/GitHub_13822.il [new file with mode: 0644]
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_13822/GitHub_13822.ilproj [new file with mode: 0644]