Skip to content

Commit

Permalink
Add MethodImplOptions.AggressiveOptimization and use it for tiering
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kouvel committed Sep 17, 2018
1 parent 3743d9a commit d310b5f
Show file tree
Hide file tree
Showing 15 changed files with 1,973 additions and 1,736 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum MethodImplOptions
NoOptimization = 0x0040,
PreserveSig = 0x0080,
AggressiveInlining = 0x0100,
AggressiveOptimization = 0x0200,
InternalCall = 0x1000
}
}
3 changes: 2 additions & 1 deletion src/ilasm/asmparse.y
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
%token VALUE_ VALUETYPE_ NATIVE_ INSTANCE_ SPECIALNAME_ FORWARDER_
%token STATIC_ PUBLIC_ PRIVATE_ FAMILY_ FINAL_ SYNCHRONIZED_ INTERFACE_ SEALED_ NESTED_
%token ABSTRACT_ AUTO_ SEQUENTIAL_ EXPLICIT_ ANSI_ UNICODE_ AUTOCHAR_ IMPORT_ ENUM_
%token VIRTUAL_ NOINLINING_ AGGRESSIVEINLINING_ NOOPTIMIZATION_ UNMANAGEDEXP_ BEFOREFIELDINIT_
%token VIRTUAL_ NOINLINING_ AGGRESSIVEINLINING_ NOOPTIMIZATION_ AGGRESSIVEOPTIMIZATION_ UNMANAGEDEXP_ BEFOREFIELDINIT_
%token STRICT_ RETARGETABLE_ WINDOWSRUNTIME_ NOPLATFORM_
%token METHOD_ FIELD_ PINNED_ MODREQ_ MODOPT_ SERIALIZABLE_ PROPERTY_ TYPE_
%token ASSEMBLY_ FAMANDASSEM_ FAMORASSEM_ PRIVATESCOPE_ HIDEBYSIG_ NEWSLOT_ RTSPECIALNAME_ PINVOKEIMPL_
Expand Down Expand Up @@ -854,6 +854,7 @@ implAttr : /* EMPTY */ { $$ = (CorMethodImp
| implAttr NOINLINING_ { $$ = (CorMethodImpl) ($1 | miNoInlining); }
| implAttr AGGRESSIVEINLINING_ { $$ = (CorMethodImpl) ($1 | miAggressiveInlining); }
| implAttr NOOPTIMIZATION_ { $$ = (CorMethodImpl) ($1 | miNoOptimization); }
| implAttr AGGRESSIVEOPTIMIZATION_ { $$ = (CorMethodImpl) ($1 | miAggressiveOptimization); }
| implAttr FLAGS_ '(' int32 ')' { $$ = (CorMethodImpl) ($4); }
;

Expand Down
Loading

0 comments on commit d310b5f

Please sign in to comment.