freedreno/ir3/sched: avoid getting stuck on addr conflicts
authorRob Clark <robclark@freedesktop.org>
Wed, 8 Apr 2015 15:04:37 +0000 (11:04 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 11 Apr 2015 15:40:15 +0000 (11:40 -0400)
commit49be76166b0b3c93bd2287fabc31d76d143d314c
tree3d03c23057ce84e32ac79b67e5d8731b60d7e1e6
parent4cf4006674bd7c507688316e2033d77066c45c90
freedreno/ir3/sched: avoid getting stuck on addr conflicts

When we get in a scenario where we cannot schedule any more instructions
due to address register conflict, clone the instruction that writes the
address register, and switch the remaining unscheduled users for the
current address register over to the new clone.

This is simpler and more robust than the previous attempt (which tried
and sometimes failed to ensure all other dependencies of users of the
address register were scheduled first).. hint it would try to schedule
instructions that were not actually needed for any output value.

We probably need to do the same with predicate register, although so far
it isn't so heavily used so we aren't running into problems with it
(yet).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_sched.c