Skip to content

Commit 8e14aaf

Browse files
Introduce switch for stress-morphing
1 parent 5a30553 commit 8e14aaf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/coreclr/jit/flowgraph.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,6 +2901,19 @@ PhaseStatus Compiler::fgRationalizeAssignments()
29012901

29022902
compAssignmentRationalized = true;
29032903

2904+
#ifdef DEBUG
2905+
if (JitConfig.JitStressMorphStores())
2906+
{
2907+
for (BasicBlock* block : Blocks())
2908+
{
2909+
for (Statement* stmt : block->Statements())
2910+
{
2911+
fgMorphBlockStmt(block, stmt DEBUGARG("fgRationalizeAssignments"));
2912+
}
2913+
}
2914+
}
2915+
#endif // DEBUG
2916+
29042917
return PhaseStatus::MODIFIED_EVERYTHING;
29052918
}
29062919

src/coreclr/jit/jitconfigvalues.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ CONFIG_INTEGER(JitStressModeNamesOnly, W("JitStressModeNamesOnly"), 0) // Intern
170170
CONFIG_INTEGER(JitStressProcedureSplitting, W("JitStressProcedureSplitting"), 0) // Always split after the first basic
171171
// block. Skips functions with EH
172172
// for simplicity.
173+
CONFIG_INTEGER(JitStressMorphStores, W("JitStressMorphStores"), 0) // Morph trees after assignment rationalization
173174
CONFIG_INTEGER(JitStressRegs, W("JitStressRegs"), 0)
174175
CONFIG_STRING(JitStressRegsRange, W("JitStressRegsRange")) // Only apply JitStressRegs to methods in this hash range
175176

0 commit comments

Comments
 (0)