From dcb68de6563d511ccf78ed12b76516038e452df4 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Fri, 20 Oct 2023 12:16:18 -0700 Subject: [PATCH] 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 Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_schedule_instructions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_schedule_instructions.cpp b/src/intel/compiler/brw_schedule_instructions.cpp index 9b20431fab2..0855ee9a131 100644 --- a/src/intel/compiler/brw_schedule_instructions.cpp +++ b/src/intel/compiler/brw_schedule_instructions.cpp @@ -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);