lima/gpir: Fix fake dep handling for schedule_first nodes
authorConnor Abbott <cwabbott0@gmail.com>
Sat, 7 Sep 2019 14:40:14 +0000 (16:40 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 9 Sep 2019 10:42:00 +0000 (17:42 +0700)
commit8c7ad22adbd68bc6f4cbe907cb6a476ffe1465ba
tree3fa92b202f56fc73b84fb1d351df0c09c8908e48
parent2955875381c18290a8f6f798ab78dc53cf3daa47
lima/gpir: Fix fake dep handling for schedule_first nodes

The whole point of schedule_first nodes is that they need to be
scheduled as soon as possible, so if a schedule_first node is the
successor in a fake dependency that prevents it from being scheduled
after its parent, that can cause problems. We need to add these fake
dependencies to the parent as well, and we need to guarantee that the
pre-RA scheduler puts schedule_first nodes right before their parents in
order to prevent this from adding cycles to the dependency graph.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/ir/gp/reduce_scheduler.c
src/gallium/drivers/lima/ir/gp/scheduler.c