Add MethodImplOptions.AggressiveOptimization and use it for tiering (#20009)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Wed, 3 Oct 2018 15:52:40 +0000 (08:52 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Oct 2018 15:52:40 +0000 (08:52 -0700)
commitb68296ce2c56188cf2a7bd263903e27c67717702
tree3c535c8fe4f92d91fc590a6cd25731ed5b222f25
parent50567db6e3851f4c4680771424a354e2258333b4
Add MethodImplOptions.AggressiveOptimization and use it for tiering (#20009)

Add MethodImplOptions.AggressiveOptimization and use it for tiering

Part of fix for https://github.com/dotnet/corefx/issues/32235
Workaround for https://github.com/dotnet/coreclr/issues/19751
- Added and set CORJIT_FLAG_AGGRESSIVE_OPT to indicate that a method is flagged with AggressiveOptimization
- For a method flagged with AggressiveOptimization, tiering uses a foreground tier 1 JIT on first call to the method, skipping the tier 0 JIT and call counting
- When tiering is disabled, a method flagged with AggressiveOptimization does not use r2r-pregenerated code
- R2r crossgen does not generate code for a method flagged with AggressiveOptimization
19 files changed:
src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplOptions.cs
src/ilasm/asmparse.y
src/ilasm/prebuilt/asmparse.cpp
src/ildasm/dasm.cpp
src/inc/corhdr.h
src/inc/corinfo.h
src/inc/il_kywd.h
src/vm/CMakeLists.txt
src/vm/codeversion.cpp
src/vm/codeversion.h
src/vm/jitinterface.cpp
src/vm/method.hpp
src/vm/prestub.cpp
src/vm/tieredcompilation.cpp
src/vm/tieredcompilation.h
src/zap/zapinfo.cpp
tests/src/ilasm/System/Runtime/CompilerServices/MethodImplOptionsTests.cs [new file with mode: 0644]
tests/src/ilasm/System/Runtime/CompilerServices/MethodImplOptionsTests.csproj [new file with mode: 0644]
tests/src/ilasm/System/Runtime/CompilerServices/MiAggressiveOptimization.il [new file with mode: 0644]