JIT: Remove bbFallsThrough restriction in fgOptimizeEmptyBlock#99634
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Not sure I understand. Are you saying you're not going as far as you wanted to with this change? |
Sorry for the confusion, I didn't mean to imply I was holding back. With this change, we will now remove empty |
|
At least superficially the diffs look great, including some nice TP wins. |
Now that the JIT's implicit fallthrough assumption for certain block kinds is gone, we should start stripping out any logic dependent on
bbFallsThrough. Note thatfgReorderBlocksmakes several decisions usingbbFallsThrough-- I hope we can get rid of all of that in one go when we try a new block layout algorithm.As for this change to
fgOptimizeEmptyBlock, the pattern of always placing aBBJ_ALWAYSafter aBBJ_CONDto maintain implicit fallthrough is gone, so if we have aBBJ_CONDblock that "falls through" to an emptyBBJ_ALWAYSthat jumps somewhere else, this is logically equivalent to theBBJ_COND's false successor simply being the target of theBBJ_ALWAYSblock, so we should have no problem removing the latter block. However, this creates churn during later optimization phases...