-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtime.CompilerServices
Milestone
Description
Add MethodImplOptions.AggressiveOptimization
as a counterpart to MethodImplOptions.NoOptimization
. NoOptimization
would override AggressiveOptimization
.
[Flags]
public enum MethodImplOptions
{
// Unmanaged = 0x0004,
// NoInlining = 0x0008,
// ForwardRef = 0x0010,
// Synchronized = 0x0020,
// NoOptimization = 0x0040,
// PreserveSig = 0x0080,
// AggressiveInlining = 0x0100,
AggressiveOptimization = 0x0200,
// InternalCall = 0x1000
}
This would also add a new keyword aggressiveoptimization
to IL ASM:
.method private hidebysig static void Main() cil managed aggressiveoptimization
The flag could be used in a MethodImplAttribute
to indicate that the method contains hot code:
- For tiering, it could cause tier 1 JIT to be used right away for the method, as a workaround for https://github.com/dotnet/coreclr/issues/19751
- For this reason, we would also like to add this API to 2.2, as it is currently planned to enable tiering by default in 2.2 for release
- It could allow the JIT to spend more JIT time to generate better code, such as inlining more aggressively into the function
4creators, ltrzesniewski and omariom
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtime.CompilerServices