From 8f09c58ddcead8e05a06823681fb3ec83c7dbf81 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 3 Mar 2024 02:47:53 -0800 Subject: [PATCH] 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 Part-of: --- src/intel/compiler/brw_fs_opt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_fs_opt.cpp b/src/intel/compiler/brw_fs_opt.cpp index fb0e0b99c8d..2a0b4aefeb6 100644 --- a/src/intel/compiler/brw_fs_opt.cpp +++ b/src/intel/compiler/brw_fs_opt.cpp @@ -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);