From d4e9306c4096254a86564d49e4a4346bd48986a3 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Wed, 3 Oct 2018 08:52:40 -0700 Subject: [PATCH] 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 Signed-off-by: dotnet-bot --- .../CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs index 2b5affc699ab..b50ae094ce04 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs @@ -16,6 +16,7 @@ public enum MethodImplOptions NoOptimization = 0x0040, PreserveSig = 0x0080, AggressiveInlining = 0x0100, + AggressiveOptimization = 0x0200, InternalCall = 0x1000 } } \ No newline at end of file