diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2019-05-02 13:48:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 13:48:13 -0700 |
commit | 607c8db3931cc4f4afe086f2cd4dd957d35ef0ac (patch) | |
tree | 511c45c80e528ca2b2b249213fd7a15a64191652 /src/vm/methodtablebuilder.cpp | |
parent | ee8c00f18b0230fa92bed627ebd0dbe26d30b721 (diff) | |
download | coreclr-607c8db3931cc4f4afe086f2cd4dd957d35ef0ac.tar.gz coreclr-607c8db3931cc4f4afe086f2cd4dd957d35ef0ac.tar.bz2 coreclr-607c8db3931cc4f4afe086f2cd4dd957d35ef0ac.zip |
When QuickJit is enabled, disable it for methods that contain loops by default (#24252)
When QuickJit is enabled, disable it for methods that contain loops by default
Fixes https://github.com/dotnet/coreclr/issues/19751 by default when QuickJit is enabled
- Added config variable TC_QuickJitForLoops. When disabled (the default), the JIT identifies loops and explicit tail calls and switches to tier 1 JIT.
- This would prevent the possibility of spending too long in QuickJit code, but may decrease startup time a bit when QuickJit is enabled
- Removed TC_StartupTier_OptimizeCode, as now that there is TC_QuickJit, I didn't see a good use for it
- Removed references to "StartupTier" in config variables because we had previously decided not to call it that.
- When QuickJit is disabled, avoid creating native code slots for methods in non-R2R'ed modules, as tiering would be disabled for those anyway
- Marked TC_QuickJit config var as external
Diffstat (limited to 'src/vm/methodtablebuilder.cpp')
-rw-r--r-- | src/vm/methodtablebuilder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp index 5b094f6555..b2e7a07859 100644 --- a/src/vm/methodtablebuilder.cpp +++ b/src/vm/methodtablebuilder.cpp @@ -6959,6 +6959,11 @@ MethodTableBuilder::NeedsNativeCodeSlot(bmtMDMethod * pMDMethod) #ifdef FEATURE_TIERED_COMPILATION // Keep in-sync with MethodDesc::DetermineAndSetIsEligibleForTieredCompilation() if (g_pConfig->TieredCompilation() && + + // Policy - If QuickJit is disabled and the module is not ReadyToRun, the method would be ineligible for tiering + // currently to avoid some unnecessary overhead + (g_pConfig->TieredCompilation_QuickJit() || GetModule()->IsReadyToRun()) && + (pMDMethod->GetMethodType() == METHOD_TYPE_NORMAL || pMDMethod->GetMethodType() == METHOD_TYPE_INSTANTIATED)) { return TRUE; |