Don't remove the first non-internal block that has profile weight. (#16227)
authorEugene Rozenfeld <erozen@microsoft.com>
Tue, 6 Feb 2018 19:19:32 +0000 (11:19 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Feb 2018 19:19:32 +0000 (11:19 -0800)
commit72b955cc23125c0bf63e6623ecc8496114ed186c
tree4e180eebf5286be013e65062e31b923621e6ed8c
parenta3632298282f1c6a85c02b80d921075ee1af0d1e
Don't remove the first non-internal block that has profile weight. (#16227)

When using profile weights, fgComputeEdgeWeights expects the first non-internal block to have profile weight.
Make sure we don't break that invariant when removing an empty block.

This fixes VSO 546031.
src/jit/flowgraph.cpp