JIT: Remove TYP_BLK and TYP_LCLBLK (#83036)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Thu, 9 Mar 2023 13:09:48 +0000 (14:09 +0100)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2023 13:09:48 +0000 (14:09 +0100)
commit5c7e6d65a57f89725020b682eef2692dc73a64f8
treeb6b5805cdb53bed92df3159e429820f235173625
parente5fb928535e9ab30412a257a262083e781ed62ff
JIT: Remove TYP_BLK and TYP_LCLBLK (#83036)

This PR allows TYP_STRUCT locals to have block layouts and replaces uses
of TYP_BLK and TYP_LCLBLK with such locals instead.

There is still an invariant that any struct parameter local (even SIMD) has a non-block layout.

Also fixes a bug related to GS cookie handle with jit32 GC encoder -- it is
not allowed to be at fp+0, so we need to insert some padding in some cases because
now that some GS cookie-requiring locals are TYP_STRUCT they can sometimes be
removed from the frame.

To fix a TP regression, also precache the 0-sized block layout in the layout table. This
layout is used by all non-x86 compilations because the outgoing arg area starts out
as a 0-sized block local that is always allocated.
23 files changed:
src/coreclr/jit/codegencommon.cpp
src/coreclr/jit/codegenxarch.cpp
src/coreclr/jit/compiler.cpp
src/coreclr/jit/compiler.h
src/coreclr/jit/flowgraph.cpp
src/coreclr/jit/gcencode.cpp
src/coreclr/jit/gentree.cpp
src/coreclr/jit/gschecks.cpp
src/coreclr/jit/importer.cpp
src/coreclr/jit/layout.cpp
src/coreclr/jit/layout.h
src/coreclr/jit/lclmorph.cpp
src/coreclr/jit/lclvars.cpp
src/coreclr/jit/lower.cpp
src/coreclr/jit/morph.cpp
src/coreclr/jit/morphblock.cpp
src/coreclr/jit/optcse.cpp
src/coreclr/jit/regalloc.cpp
src/coreclr/jit/scopeinfo.cpp
src/coreclr/jit/typelist.h
src/coreclr/jit/valuenum.cpp
src/coreclr/jit/vartype.h
src/coreclr/tools/SuperFileCheck/Program.cs