Skip to content

Commit

Permalink
JIT: Remove the minopts policy against cctors (#90792)
Browse files Browse the repository at this point in the history
* Introduce a switch to use FullOpts for cctors

* Remove the obsolete policy around cctors

* Revert changes around the new switch
  • Loading branch information
hez2010 authored Sep 1, 2023
1 parent 2aea244 commit 31fc330
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down Expand Up @@ -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))
{
Expand All @@ -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.
Expand Down

0 comments on commit 31fc330

Please sign in to comment.