Skip to content

Commit

Permalink
Fix fgUpdateChangedFlowGraph.
Browse files Browse the repository at this point in the history
`fgComputeDoms` has an assumption that the flow graph
has no unreachable blocks. It's checked with this assert:

https://github.com/dotnet/runtime/blob/ad325b014124b1adb9306abf95fdac85e3f7f2f4/src/coreclr/src/jit/flowgraph.cpp#L2342

This assert fired when testing dotnet#39474 (`Convert Math{F}.CoreCLR methods from FCall to QCall`)
when we are updating the flow graph after inserting GC polls.

This change switches `fgUpdateChangedFlowGraph` to call `fgComputeReachability`,
which both removes unreachable blocks and calls `fgComputeDoms`.

pin-icount reported a 0.0043% throughput improvement, which is within noise level.
  • Loading branch information
erozenfeld committed Jul 24, 2020
1 parent 0a1f7ba commit 1ee39df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/src/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,7 @@ void Compiler::fgUpdateChangedFlowGraph()

fgComputePreds();
fgComputeEnterBlocksSet();
fgComputeReachabilitySets();
fgComputeDoms();
fgComputeReachability();
}

/*****************************************************************************
Expand Down

0 comments on commit 1ee39df

Please sign in to comment.