intel/compiler: Move SCHEDULE_NONE handling into schedule_instructions()

I'm going to introduce another call site for this function, and just
handling SCHEDULE_NONE in the scheduler itself makes more sense than
duplicating the logic.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24707>
This commit is contained in:
Kenneth Graunke 2023-08-14 19:19:45 -07:00 committed by Marge Bot
parent 743fd60bea
commit 7eba19245d
2 changed files with 4 additions and 2 deletions

View file

@ -6798,8 +6798,7 @@ fs_visitor::allocate_registers(bool allow_spilling)
invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
}
if (pre_modes[i] != SCHEDULE_NONE)
schedule_instructions(pre_modes[i]);
schedule_instructions(pre_modes[i]);
this->shader_stats.scheduler_mode = scheduler_mode_name[i];
if (0) {

View file

@ -1984,6 +1984,9 @@ instruction_scheduler::run(cfg_t *cfg)
void
fs_visitor::schedule_instructions(instruction_scheduler_mode mode)
{
if (mode == SCHEDULE_NONE)
return;
int grf_count;
if (mode == SCHEDULE_POST)
grf_count = grf_used;