Split Rank1 MdArray allocation into a separate helper (#84205)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Mon, 3 Apr 2023 16:01:24 +0000 (01:01 +0900)
committerGitHub <noreply@github.com>
Mon, 3 Apr 2023 16:01:24 +0000 (09:01 -0700)
commit388d6663395b32be4dfbfb82e5aca752373f5c06
treeabdd8a55a23a34083191021c315aa17eeb2289d5
parent6146bad3ea66266949dc706f9f6dc56956bf5262
Split Rank1 MdArray allocation into a separate helper (#84205)

MdArray rank1 with all-zero lower bounds gets actually allocated as an SzArray. On Native AOT this means we need to spin up to the type loader to potentially load the new type. Split this expensive (and impossible-to-express-in-C#) thing into a separate helper so we can trim the type loader.

https://github.com/dotnet/runtime/pull/84156#issuecomment-1491402863
13 files changed:
src/coreclr/inc/corinfo.h
src/coreclr/inc/jiteeversionguid.h
src/coreclr/inc/jithelpers.h
src/coreclr/jit/importer.cpp
src/coreclr/jit/importercalls.cpp
src/coreclr/jit/utils.cpp
src/coreclr/jit/valuenum.cpp
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/ArrayHelpers.cs
src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs
src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs
src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs
src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs