ra: Add a callback for selecting a register from what's available

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 25 July 2017 17:44 EDT

VC4 has had a tension, similar to pre-Sandybridge Intel, where we want to use low-numbered registers (more parallelism on Intel, fewer delay slots on vc4), but in order to give instruction scheduling the most freedom to avoid delays we want to round-robin between registers of the same cost. Our two heuristics so far have chosen one end or the other of that tradeoff.

The callback, instead, hands the driver the set of registers that are available, and the driver gets to make its own choice. This will be used in vc4 to round-robin between registers of the same cost, and might be used in the future for improving bank selection.

7a34a0e ra: Add a callback for selecting a register from what's available.
src/util/register_allocate.c | 90 +++++++++++++++++++++++++++++++++++++-------
src/util/register_allocate.h | 6 +++
2 files changed, 82 insertions(+), 14 deletions(-)

Upstream: cgit.freedesktop.org


  • Share