Fixes a subtle bug in branch optimizer.
"branch over branch" optimization eliminates chains of trivial basic blocks from the graph, which is correct as long as trivial blocks are not reachable individually from outside via branches. The "same as next" optimization can make a block trivial and if it was targeted by a branch, break the assumption, leading to a rare situation of some branches having stale offsets. The fix makes sure if a block becomes trivial, its labels are moved to the next nontrivial block. Fixes #4838 Fixes #4839
Showing
想要评论请 注册 或 登录