pan/bi: Track liveness while scheduling
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 6 May 2021 15:11:09 +0000 (11:11 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 18:06:10 +0000 (18:06 +0000)
commit7aefd6c1ba2d9ca019bbb2ef283d12be97ca93ba
tree4c6e02ea99a6788a0e2c67298630515b3fde37cb
parent20809daa9a7065b21718f9d2aa29dbb7f3953d75
pan/bi: Track liveness while scheduling

If we know that a value is killed in the next tuple, there is no need to
write it out to the register file. We already handled this as a packing
fixup. However, avoiding this write also frees up an extra slot in the
register block, which offers additional scheduling freedom. To take
advantage of this, we extend liveness analysis to work while scheduling,
and modify the schedulable predicate accordingly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
src/panfrost/bifrost/bi_opt_dce.c
src/panfrost/bifrost/bi_schedule.c
src/panfrost/bifrost/compiler.h