Skip to content

Commit e29ffeb

Browse files
authored
JIT: Add a release config to enable/disable IV opts (#106253)
Allow easily turning off all the new IV opts to enable some quick coarse-grained diagnosis.
1 parent c16d526 commit e29ffeb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/coreclr/jit/inductionvariableopts.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,6 +2405,12 @@ PhaseStatus Compiler::optInductionVariables()
24052405
return PhaseStatus::MODIFIED_NOTHING;
24062406
}
24072407

2408+
if (JitConfig.JitEnableInductionVariableOpts() == 0)
2409+
{
2410+
JITDUMP(" Skipping since it is disabled due to JitEnableInductionVariableOpts\n");
2411+
return PhaseStatus::MODIFIED_NOTHING;
2412+
}
2413+
24082414
bool changed = false;
24092415

24102416
optReachableBitVecTraits = nullptr;

src/coreclr/jit/jitconfigvalues.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ RELEASE_CONFIG_INTEGER(JitDoReversePostOrderLayout, W("JitDoReversePostOrderLayo
775775
// Enable strength reduction
776776
RELEASE_CONFIG_INTEGER(JitEnableStrengthReduction, W("JitEnableStrengthReduction"), 1)
777777

778+
// Enable IV optimizations
779+
RELEASE_CONFIG_INTEGER(JitEnableInductionVariableOpts, W("JitEnableInductionVariableOpts"), 1)
780+
778781
// JitFunctionFile: Name of a file that contains a list of functions. If the currently compiled function is in the
779782
// file, certain other JIT config variables will be active. If the currently compiled function is not in the file,
780783
// the specific JIT config variables will not be active.

0 commit comments

Comments
 (0)