nir: replace nir_opt_remove_phis_block with a single source version
This is what callers actually want, and it simplifies nir_opt_remove_phis because we can assume dominance meta data is valid. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
This commit is contained in:
@@ -88,7 +88,7 @@ sanitize_if(nir_function_impl* impl, nir_if* nif)
|
||||
* or dead control-flow passes and are perfectly legal. Run a quick phi
|
||||
* removal on the block after the if to clean up any such phis.
|
||||
*/
|
||||
nir_opt_remove_phis_block(nir_cf_node_as_block(nir_cf_node_next(&nif->cf_node)));
|
||||
nir_remove_single_src_phis_block(nir_cf_node_as_block(nir_cf_node_next(&nif->cf_node)));
|
||||
|
||||
/* Finally, move the continue from branch after the if-statement. */
|
||||
nir_block* last_continue_from_blk = then_jump ? else_block : then_block;
|
||||
|
||||
Reference in New Issue
Block a user