intel/compiler: Clear up block instructions before re-adding them

Avoids fixing up list pointers that we don't care about anymore -- since
all the instructions will be re-added in a different order anyway.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25841>
This commit is contained in:
Caio Oliveira 2023-10-20 12:16:18 -07:00 committed by Marge Bot
parent a9f95bf687
commit dcb68de656

View file

@ -1861,7 +1861,6 @@ instruction_scheduler::schedule(schedule_node *chosen)
assert(chosen);
chosen->remove();
chosen->inst->exec_node::remove();
current.block->instructions.push_tail(chosen->inst);
/* If we expected a delay for scheduling, then bump the clock to reflect
@ -1942,6 +1941,8 @@ fs_instruction_scheduler::schedule_instructions()
current.available.push_tail(n);
}
current.block->instructions.make_empty();
while (!current.available.is_empty()) {
schedule_node *chosen = choose_instruction_to_schedule();
schedule(chosen);
@ -2012,6 +2013,8 @@ vec4_instruction_scheduler::run()
current.available.push_tail(n);
}
current.block->instructions.make_empty();
while (!current.available.is_empty()) {
schedule_node *chosen = choose_instruction_to_schedule();
schedule(chosen);