From 31fc33026c81e396643d1e1101a7286f75d6dc8a Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 2 Sep 2023 01:55:48 +0900 Subject: [PATCH] JIT: Remove the minopts policy against cctors (#90792) * Introduce a switch to use FullOpts for cctors * Remove the obsolete policy around cctors * Revert changes around the new switch --- src/coreclr/jit/compiler.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 2e58ec54c09..a1f8c173e76 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -2434,12 +2434,6 @@ void Compiler::compInitOptions(JitFlags* jitFlags) { opts.compFlags = CLFLG_MINOPT; } - // Don't optimize .cctors (except prejit) or if we're an inlinee - else if (!jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && ((info.compFlags & FLG_CCTOR) == FLG_CCTOR) && - !compIsForInlining()) - { - opts.compFlags = CLFLG_MINOPT; - } // Default value is to generate a blend of size and speed optimizations // @@ -2579,7 +2573,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) pfAltJit = &JitConfig.AltJit(); } - if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) + if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) { if (pfAltJit->contains(info.compMethodHnd, info.compClassHnd, &info.compMethodInfo->args)) { @@ -2605,7 +2599,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) altJitVal = JitConfig.AltJit().list(); } - if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) + if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT)) { // In release mode, you either get all methods or no methods. You must use "*" as the parameter, or we ignore // it. You don't get to give a regular expression of methods to match. -- GitLab