intel/brw: Pull eliminate_find_live_channel out of fs_visitor

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
This commit is contained in:
Caio Oliveira 2024-01-03 14:51:58 -08:00 committed by Marge Bot
parent 4f314f89f7
commit 73fe658456
2 changed files with 7 additions and 7 deletions

View file

@ -3174,13 +3174,13 @@ brw_fs_opt_remove_redundant_halts(fs_visitor &s)
* analysis.
*/
bool
fs_visitor::eliminate_find_live_channel()
brw_fs_opt_eliminate_find_live_channel(fs_visitor &s)
{
bool progress = false;
unsigned depth = 0;
if (!brw_stage_has_packed_dispatch(devinfo, stage, max_polygons,
stage_prog_data)) {
if (!brw_stage_has_packed_dispatch(s.devinfo, s.stage, s.max_polygons,
s.stage_prog_data)) {
/* The optimization below assumes that channel zero is live on thread
* dispatch, which may not be the case if the fixed function dispatches
* threads sparsely.
@ -3188,7 +3188,7 @@ fs_visitor::eliminate_find_live_channel()
return false;
}
foreach_block_and_inst_safe(block, fs_inst, inst, cfg) {
foreach_block_and_inst_safe(block, fs_inst, inst, s.cfg) {
switch (inst->opcode) {
case BRW_OPCODE_IF:
case BRW_OPCODE_DO:
@ -3223,7 +3223,7 @@ fs_visitor::eliminate_find_live_channel()
out:
if (progress)
invalidate_analysis(DEPENDENCY_INSTRUCTION_DETAIL);
s.invalidate_analysis(DEPENDENCY_INSTRUCTION_DETAIL);
return progress;
}
@ -5688,7 +5688,7 @@ fs_visitor::optimize()
OPT(dead_control_flow_eliminate, this);
OPT(brw_fs_opt_saturate_propagation, *this);
OPT(register_coalesce);
OPT(eliminate_find_live_channel);
OPT(brw_fs_opt_eliminate_find_live_channel, *this);
OPT(brw_fs_opt_compact_virtual_grfs, *this);
} while (progress);

View file

@ -266,7 +266,6 @@ public:
#endif
bool register_coalesce();
bool eliminate_find_live_channel();
bool remove_extra_rounding_modes();
fs_instruction_scheduler *prepare_scheduler(void *mem_ctx);
@ -618,6 +617,7 @@ bool brw_fs_opt_compact_virtual_grfs(fs_visitor &s);
bool brw_fs_opt_copy_propagation(fs_visitor &s);
bool brw_fs_opt_cse(fs_visitor &s);
bool brw_fs_opt_dead_code_eliminate(fs_visitor &s);
bool brw_fs_opt_eliminate_find_live_channel(fs_visitor &s);
bool brw_fs_opt_peephole_sel(fs_visitor &s);
bool brw_fs_opt_remove_redundant_halts(fs_visitor &s);
bool brw_fs_opt_saturate_propagation(fs_visitor &s);