Skip to content

Commit 880371b

Browse files
committed
Remove the obsolete policy around cctors
1 parent 23e902e commit 880371b

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
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 and JitFullOptsForCctors) or if we're an inlinee
2438-
else if (!jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && ((info.compFlags & FLG_CCTOR) == FLG_CCTOR) &&
2439-
!compIsForInlining() && !JitConfig.JitFullOptsForCctors())
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.

src/coreclr/jit/jitconfigvalues.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ CONFIG_INTEGER(JitInlineDepth, W("JITInlineDepth"), DEFAULT_MAX_INLINE_DEPTH)
108108
CONFIG_INTEGER(JitForceInlineDepth, W("JITForceInlineDepth"), DEFAULT_MAX_FORCE_INLINE_DEPTH)
109109
CONFIG_INTEGER(JitLongAddress, W("JitLongAddress"), 0) // Force using the large pseudo instruction form for long address
110110
CONFIG_INTEGER(JitMaxUncheckedOffset, W("JitMaxUncheckedOffset"), 8)
111-
CONFIG_INTEGER(JitFullOptsForCctors, W("JitFullOptsForCctors"), 0) // Use FullOpts for cctors
112111
CONFIG_INTEGER(JitMinOpts, W("JITMinOpts"), 0) // Forces MinOpts
113112
CONFIG_INTEGER(JitMinOptsBbCount, W("JITMinOptsBbCount"), DEFAULT_MIN_OPTS_BB_COUNT) // Internal jit control of MinOpts
114113
CONFIG_INTEGER(JitMinOptsCodeSize, W("JITMinOptsCodeSize"), DEFAULT_MIN_OPTS_CODE_SIZE) // Internal jit control of

src/coreclr/vm/eeconfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ HRESULT EEConfig::sync()
544544

545545
fJitFramed = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_JitFramed) != 0);
546546
fJitMinOpts = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_JITMinOpts) == 1);
547-
fJitFullOptsForCctors = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_JITFullOptsForCctors) == 1);
548547
fJitEnableOptionalRelocs = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_JitEnableOptionalRelocs) == 1);
548+
fJitFullOptsForCctors = (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_JITFullOptsForCctors) == 1);
549549
iJitOptimizeType = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_JitOptimizeType);
550550
if (iJitOptimizeType > OPT_RANDOM) iJitOptimizeType = OPT_DEFAULT;
551551

src/coreclr/vm/eeconfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class EEConfig
7676
unsigned int GenOptimizeType(void) const {LIMITED_METHOD_CONTRACT; return iJitOptimizeType; }
7777
bool JitFramed(void) const {LIMITED_METHOD_CONTRACT; return fJitFramed; }
7878
bool JitMinOpts(void) const {LIMITED_METHOD_CONTRACT; return fJitMinOpts; }
79-
bool JitFullOptsForCctors(void) const {LIMITED_METHOD_CONTRACT; return fJitFullOptsForCctors; }
8079
bool JitEnableOptionalRelocs(void) const {LIMITED_METHOD_CONTRACT; return fJitEnableOptionalRelocs; }
80+
bool JitFullOptsForCctors(void) const {LIMITED_METHOD_CONTRACT; return fJitFullOptsForCctors; }
8181

8282
// Tiered Compilation config
8383
#if defined(FEATURE_TIERED_COMPILATION)
@@ -480,8 +480,8 @@ class EEConfig
480480
bool fTrackDynamicMethodDebugInfo; // Enable/Disable tracking dynamic method debug info
481481
bool fJitFramed; // Enable/Disable EBP based frames
482482
bool fJitMinOpts; // Enable MinOpts for all jitted methods
483-
bool fJitFullOptsForCctors; // Enable FullOpts for cctors
484483
bool fJitEnableOptionalRelocs; // Allow optional relocs
484+
bool fJitFullOptsForCctors; // Enable FullOpts for cctors
485485

486486
unsigned iJitOptimizeType; // 0=Blended,1=SmallCode,2=FastCode, default is 0=Blended
487487

0 commit comments

Comments
 (0)