summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDong-Heon Jung <dheon.jung@samsung.com>2019-10-18 00:23:51 (GMT)
committerGleb Balykov <g.balykov@samsung.com>2020-03-25 12:29:41 (GMT)
commit01bbc42b312caeb4000c9002561c62fe4e420ab5 (patch)
tree1c35831d534d4fc7897bed7ab04a5dd7ea3918cb /src
parentefa62c091a5c9a2729f8948c1d3703156fb78e3b (diff)
downloadcoreclr-01bbc42b312caeb4000c9002561c62fe4e420ab5.zip
coreclr-01bbc42b312caeb4000c9002561c62fe4e420ab5.tar.gz
coreclr-01bbc42b312caeb4000c9002561c62fe4e420ab5.tar.bz2
Enable NGEN for methods marked with AggressiveOptimization (#27259)
- Methods marked with AggressiveOptimization are not NGENed at all. - The methods are compiled during the runtime with high JITC overhead. - It makes launching time slower over 6% in our embedded systems.
Diffstat (limited to 'src')
-rw-r--r--src/zap/zapinfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index d36d650..dd49d6a 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -445,7 +445,9 @@ void ZapInfo::CompileMethod()
// Retrieve method attributes from EEJitInfo - the ZapInfo's version updates
// some of the flags related to hardware intrinsics but we don't want that.
DWORD methodAttribs = m_pEEJitInfo->getMethodAttribs(m_currentMethodHandle);
- if (methodAttribs & CORINFO_FLG_AGGRESSIVE_OPT)
+
+#ifdef FEATURE_READYTORUN_COMPILER
+ if (IsReadyToRunCompilation() && (methodAttribs & CORINFO_FLG_AGGRESSIVE_OPT))
{
// Skip methods marked with MethodImplOptions.AggressiveOptimization, they will be jitted instead. In the future,
// consider letting the JIT determine whether aggressively optimized code can/should be pregenerated for the method
@@ -454,6 +456,7 @@ void ZapInfo::CompileMethod()
m_zapper->Info(W("Skipped because of aggressive optimization flag\n"));
return;
}
+#endif
#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
if (methodAttribs & CORINFO_FLG_JIT_INTRINSIC)