diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2018-10-03 08:52:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-03 08:52:40 -0700 |
commit | b68296ce2c56188cf2a7bd263903e27c67717702 (patch) | |
tree | 3c535c8fe4f92d91fc590a6cd25731ed5b222f25 /src/vm/jitinterface.cpp | |
parent | 50567db6e3851f4c4680771424a354e2258333b4 (diff) | |
download | coreclr-b68296ce2c56188cf2a7bd263903e27c67717702.tar.gz coreclr-b68296ce2c56188cf2a7bd263903e27c67717702.tar.bz2 coreclr-b68296ce2c56188cf2a7bd263903e27c67717702.zip |
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
Diffstat (limited to 'src/vm/jitinterface.cpp')
-rw-r--r-- | src/vm/jitinterface.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index 2140d34bde..28e17e9e3e 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -6776,6 +6776,17 @@ DWORD CEEInfo::getMethodAttribsInternal (CORINFO_METHOD_HANDLE ftn) result |= CORINFO_FLG_DONT_INLINE_CALLER; } + // Check for the aggressive optimization directive. AggressiveOptimization only makes sense for IL methods. + DWORD ilMethodImplAttribs = 0; + if (pMD->IsIL()) + { + ilMethodImplAttribs = pMD->GetImplAttrs(); + if (IsMiAggressiveOptimization(ilMethodImplAttribs)) + { + result |= CORINFO_FLG_AGGRESSIVE_OPT; + } + } + // Check for an inlining directive. if (pMD->IsNotInline()) { @@ -6783,7 +6794,7 @@ DWORD CEEInfo::getMethodAttribsInternal (CORINFO_METHOD_HANDLE ftn) result |= CORINFO_FLG_DONT_INLINE; } // AggressiveInlining only makes sense for IL methods. - else if (pMD->IsIL() && IsMiAggressiveInlining(pMD->GetImplAttrs())) + else if (pMD->IsIL() && IsMiAggressiveInlining(ilMethodImplAttribs)) { result |= CORINFO_FLG_FORCEINLINE; } |