intel/brw: Pull remove_extra_rounding_modes 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:
@@ -3310,10 +3310,10 @@ fs_visitor::emit_repclear_shader()
|
||||
* mode once is enough for the full vector/matrix
|
||||
*/
|
||||
bool
|
||||
fs_visitor::remove_extra_rounding_modes()
|
||||
brw_fs_opt_remove_extra_rounding_modes(fs_visitor &s)
|
||||
{
|
||||
bool progress = false;
|
||||
unsigned execution_mode = this->nir->info.float_controls_execution_mode;
|
||||
unsigned execution_mode = s.nir->info.float_controls_execution_mode;
|
||||
|
||||
brw_rnd_mode base_mode = BRW_RND_MODE_UNSPECIFIED;
|
||||
if ((FLOAT_CONTROLS_ROUNDING_MODE_RTE_FP16 |
|
||||
@@ -3327,7 +3327,7 @@ fs_visitor::remove_extra_rounding_modes()
|
||||
execution_mode)
|
||||
base_mode = BRW_RND_MODE_RTZ;
|
||||
|
||||
foreach_block (block, cfg) {
|
||||
foreach_block (block, s.cfg) {
|
||||
brw_rnd_mode prev_mode = base_mode;
|
||||
|
||||
foreach_inst_in_block_safe (fs_inst, inst, block) {
|
||||
@@ -3345,7 +3345,7 @@ fs_visitor::remove_extra_rounding_modes()
|
||||
}
|
||||
|
||||
if (progress)
|
||||
invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
|
||||
s.invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
|
||||
|
||||
return progress;
|
||||
}
|
||||
@@ -5671,7 +5671,7 @@ fs_visitor::optimize()
|
||||
*/
|
||||
OPT(brw_fs_opt_dead_code_eliminate, *this);
|
||||
|
||||
OPT(remove_extra_rounding_modes);
|
||||
OPT(brw_fs_opt_remove_extra_rounding_modes, *this);
|
||||
|
||||
do {
|
||||
progress = false;
|
||||
|
||||
@@ -266,7 +266,6 @@ public:
|
||||
#endif
|
||||
|
||||
bool register_coalesce();
|
||||
bool remove_extra_rounding_modes();
|
||||
|
||||
fs_instruction_scheduler *prepare_scheduler(void *mem_ctx);
|
||||
void schedule_instructions_pre_ra(fs_instruction_scheduler *sched,
|
||||
@@ -619,6 +618,7 @@ 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_extra_rounding_modes(fs_visitor &s);
|
||||
bool brw_fs_opt_remove_redundant_halts(fs_visitor &s);
|
||||
bool brw_fs_opt_saturate_propagation(fs_visitor &s);
|
||||
bool brw_fs_opt_split_sends(fs_visitor &s);
|
||||
|
||||
Reference in New Issue
Block a user