d4cf2df01a
Classically, global code motion is also a dead code pass. However, in the initial implementation, the decision was made to place every instruction and let conventional DCE clean up the dead ones. Because any uses of a dead instruction are unreachable, we have no late block and the dead instructions are always scheduled early. The problem is that, because we place the dead instruction early, it pushes the placement of any dependencies of the dead instruction earlier than they may need to be placed. In order prevent dead instructions from affecting the placement of live ones, we need to delete them. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4636>