Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Remove the minopts policy against cctors #90792

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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