@@ -2902,10 +2902,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
2902
2902
opts.disAlignment = false;
2903
2903
opts.disCodeBytes = false;
2904
2904
2905
- #ifdef OPT_CONFIG
2906
- opts.optRepeat = false;
2907
- #endif // OPT_CONFIG
2908
-
2905
+ opts.optRepeat = false;
2909
2906
opts.optRepeatIteration = 0;
2910
2907
opts.optRepeatCount = 1;
2911
2908
opts.optRepeatActive = false;
@@ -3084,6 +3081,13 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
3084
3081
{
3085
3082
opts.disAsm = true;
3086
3083
}
3084
+
3085
+ if ((JitConfig.JitEnableOptRepeat() != 0) &&
3086
+ (JitConfig.JitOptRepeat().contains(info.compMethodHnd, info.compClassHnd, &info.compMethodInfo->args)))
3087
+ {
3088
+ opts.optRepeat = true;
3089
+ opts.optRepeatCount = JitConfig.JitOptRepeatCount();
3090
+ }
3087
3091
#endif // !DEBUG
3088
3092
3089
3093
#ifndef DEBUG
@@ -3109,8 +3113,6 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
3109
3113
}
3110
3114
}
3111
3115
3112
- #ifdef OPT_CONFIG
3113
-
3114
3116
if (opts.optRepeat)
3115
3117
{
3116
3118
// Defer printing this until now, after the "START" line printed above.
@@ -3132,7 +3134,6 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
3132
3134
JITDUMP("\n*************** JitOptRepeat enabled by JitOptRepeatRange; repetition count: %d\n\n",
3133
3135
opts.optRepeatCount);
3134
3136
}
3135
- #endif // DEBUG
3136
3137
3137
3138
if (!opts.optRepeat && compStressCompile(STRESS_OPT_REPEAT, 10))
3138
3139
{
@@ -3146,10 +3147,9 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
3146
3147
3147
3148
JITDUMP("\n*************** JitOptRepeat for stress; repetition count: %d\n\n", opts.optRepeatCount);
3148
3149
}
3150
+ #endif // DEBUG
3149
3151
}
3150
3152
3151
- #endif // OPT_CONFIG
3152
-
3153
3153
#ifdef DEBUG
3154
3154
assert(!codeGen->isGCTypeFixed());
3155
3155
opts.compGcChecks = (JitConfig.JitGCChecks() != 0) || compStressCompile(STRESS_GENERIC_VARN, 5);
@@ -5012,12 +5012,10 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
5012
5012
doVNBasedDeadStoreRemoval = doValueNum && (JitConfig.JitDoVNBasedDeadStoreRemoval() != 0);
5013
5013
#endif // defined(OPT_CONFIG)
5014
5014
5015
- #ifdef DEBUG
5016
5015
if (opts.optRepeat)
5017
5016
{
5018
5017
opts.optRepeatActive = true;
5019
5018
}
5020
- #endif // DEBUG
5021
5019
5022
5020
while (++opts.optRepeatIteration <= opts.optRepeatCount)
5023
5021
{
@@ -5166,12 +5164,10 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl
5166
5164
#endif // DEBUG
5167
5165
}
5168
5166
5169
- #ifdef DEBUG
5170
5167
if (opts.optRepeat)
5171
5168
{
5172
5169
opts.optRepeatActive = false;
5173
5170
}
5174
- #endif // DEBUG
5175
5171
}
5176
5172
5177
5173
optLoopsCanonical = false;
0 commit comments