intel/brw: Switch to the new defs-based global CSE pass

While the limited visibility due to partial SSA is a downside to the new
pass, it has a huge number of advantages that make it worth switching
over even now.  It's much more efficient, can eliminate redundant memory
loads across blocks, and doesn't generate loads of unnecessary copies
that other passes have to clean up.  This means we also eliminate the
infighting between the old CSE, coalescing, and copy propagation passes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28666>
This commit is contained in:
Kenneth Graunke 2024-03-03 02:47:53 -08:00 committed by Marge Bot
parent 234c45c929
commit 8f09c58ddc

View file

@ -62,7 +62,7 @@ brw_fs_optimize(fs_visitor &s)
iteration++;
OPT(brw_fs_opt_algebraic);
OPT(brw_fs_opt_cse);
OPT(brw_fs_opt_cse_defs);
OPT(brw_fs_opt_copy_propagation);
OPT(brw_fs_opt_predicated_break);
OPT(brw_fs_opt_cmod_propagation);
@ -110,7 +110,7 @@ brw_fs_optimize(fs_visitor &s)
* e.g. texturing messages in cases where it wasn't possible to CSE the
* whole logical instruction.
*/
OPT(brw_fs_opt_cse);
OPT(brw_fs_opt_cse_defs);
OPT(brw_fs_opt_register_coalesce);
OPT(brw_fs_opt_dead_code_eliminate);
OPT(brw_fs_opt_peephole_sel);