OSDN Git Service

freedreno/ir3: detect scheduler fail
authorRob Clark <robclark@freedesktop.org>
Fri, 29 Aug 2014 14:51:40 +0000 (10:51 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 30 Aug 2014 22:02:50 +0000 (18:02 -0400)
commitb823abedf8d1ddba9aeaa43c4a239cb90664dae4
tree4fc302e800e73c97f3f6ab364354ca61a019691e
parent932b0ef1ceecf873213447a8778e5cbe1b3b6be7
freedreno/ir3: detect scheduler fail

There are some cases where the scheduler can get itself into impossible
situations, by scheduling the wrong write to pred or addr register
first.  (Ie. it could end up being unable to schedule any instruction if
some instruction which depends on the current addr/reg value also
depends on another addr/reg value.)

To solve this we'd need to be able to insert extra mov instructions
(which would also help when register assignment gets into impossible
situations).  To do that, we'd need to move the nop padding from sched
into legalize.

But to start with, just detect when we get into an impossible situation
and bail, rather than sitting forever in an infinite loop.  This way it
will at least fall back to the old compiler, which might even work if
you are lucky.

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