pan/midgard: Add distance metric to choose_instruction
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 28 Sep 2019 00:18:16 +0000 (20:18 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 30 Sep 2019 12:40:13 +0000 (08:40 -0400)
commit1409af9fc758b88601ceb02a1abf3cd263a224a2
tree444a55dec91f766104f04bc8e21963db4293bac9
parente9571b53e1b2d7dfa8cff5281890d6111c28fb74
pan/midgard: Add distance metric to choose_instruction

We require chosen instructions to be "close", to avoid ballooning
register pressure. This is a kludge that will go away once we have
proper liveness tracking in the scheduler, but for now it prevents a lot
of needless spilling.

v2: Lower threshold to 6 (from 8). Schedule is hurt, but a few shaders
that spilled excessively are fixed.

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