diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 7c3a3473508a49..f0a067b65d0372 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -4964,7 +4964,7 @@ class Compiler // When the flow graph changes, we need to update the block numbers, predecessor lists, reachability sets, and // dominators. - void fgUpdateChangedFlowGraph(); + void fgUpdateChangedFlowGraph(bool computeDoms = true); public: // Compute the predecessors of the blocks in the control flow graph. diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index f09c0e71fe06a5..862a10c0de7e1b 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -1865,7 +1865,7 @@ bool Compiler::fgReachable(BasicBlock* b1, BasicBlock* b2) * it again. */ -void Compiler::fgUpdateChangedFlowGraph() +void Compiler::fgUpdateChangedFlowGraph(bool computeDoms) { // We need to clear this so we don't hit an assert calling fgRenumberBlocks(). fgDomsComputed = false; @@ -1875,7 +1875,11 @@ void Compiler::fgUpdateChangedFlowGraph() fgComputePreds(); fgComputeEnterBlocksSet(); - fgComputeReachability(); + fgComputeReachabilitySets(); + if (computeDoms) + { + fgComputeDoms(); + } } /***************************************************************************** @@ -3722,7 +3726,8 @@ PhaseStatus Compiler::fgInsertGCPolls() { noway_assert(opts.OptimizationEnabled()); fgReorderBlocks(); - fgUpdateChangedFlowGraph(); + constexpr bool computeDoms = false; + fgUpdateChangedFlowGraph(computeDoms); } #ifdef DEBUG if (verbose)