Skip to content

Commit

Permalink
Add MethodImplOptions.AggressiveOptimization and use it for tiering (d…
Browse files Browse the repository at this point in the history
…otnet#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
  • Loading branch information
kouvel committed Oct 22, 2018
1 parent 0d414e6 commit 02b6482
Show file tree
Hide file tree
Showing 19 changed files with 2,050 additions and 1,795 deletions.
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 02b6482

Please sign in to comment.