pan/midgard: Add helpers for scheduling conditionals
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 23 Sep 2019 19:37:53 +0000 (15:37 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 30 Sep 2019 12:40:13 +0000 (08:40 -0400)
commitc9ce5a92a0d9e052ec4fc38e88d9aed81200489a
tree31347e377a244970bb8f7ddc0bbd3b5952fd642e
parent6f92288e85a38ae88e6c73a298891cdde667c8b8
pan/midgard: Add helpers for scheduling conditionals

Conditional instructions (csel and conditional branches) require their
condition to be written to a special condition pipeline register (r31.w
for scalar, r31.xyzw for vector). However, pipeline registers are live
only for the duration of a single bundle. As such, the logic to schedule
conditionals correct is surprisingly complex. Essentially, we see if we
could stuff the conditional within the same bundle as the csel/branch
without breaking anything; if we can, we do that. If we can't, we add a
dummy move to make room.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_schedule.c