Skip to content

Commit 31fc330

Browse files
authored
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
1 parent 2aea244 commit 31fc330

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,12 +2434,6 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
24342434
{
24352435
opts.compFlags = CLFLG_MINOPT;
24362436
}
2437-
// Don't optimize .cctors (except prejit) or if we're an inlinee
2438-
else if (!jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && ((info.compFlags & FLG_CCTOR) == FLG_CCTOR) &&
2439-
!compIsForInlining())
2440-
{
2441-
opts.compFlags = CLFLG_MINOPT;
2442-
}
24432437

24442438
// Default value is to generate a blend of size and speed optimizations
24452439
//
@@ -2579,7 +2573,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
25792573
pfAltJit = &JitConfig.AltJit();
25802574
}
25812575

2582-
if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
2576+
if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
25832577
{
25842578
if (pfAltJit->contains(info.compMethodHnd, info.compClassHnd, &info.compMethodInfo->args))
25852579
{
@@ -2605,7 +2599,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
26052599
altJitVal = JitConfig.AltJit().list();
26062600
}
26072601

2608-
if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
2602+
if (jitFlags->IsSet(JitFlags::JIT_FLAG_ALT_JIT))
26092603
{
26102604
// In release mode, you either get all methods or no methods. You must use "*" as the parameter, or we ignore
26112605
// it. You don't get to give a regular expression of methods to match.

0 commit comments

Comments
 (0)