pan/bi: Implement a scheduler

Alyssa Rosenzweig requested to merge alyssa/mesa:scheduler into master

The long-awaited MR is finally here! Based on the notes from early November. Passing GLES2 CI, hoping I didn't break GLES3... A few major features are missing:

  • Constants are totally stubbed out. The pack code is wrong here, fixing will require gutting out the pack code and adding quite a bit of extra logic to the scheduler. At 2kloc of insertions, I figure that can come as a follow-on. Also affects FAU and branching which have similar hacks to paper over this here.

  • Completely in-order. Bad for perf but correct and easier to debug. (When this is fixed, I think maintaining a BIFROST_MESA_DEBUG=inorder flag will prove extremely useful.) The relevant routines are stubbed out here so it'll just be a matter of fleshing out later, also can be a follow on.

  • No selection heuristic. Stubbed but can't be helped until we have out-of-order support.

  • Destination register handling is too conservative, fixing this requires piping in liveness information which is annoying but will probably used for the above heuristic anyway.

  • No support for spilling excess sources to moves. Required for MKVEC.v4i8 and some CSEL optimizations, not actually blocking anything to my knowledge (except maybe i8vec4 support if @icecream95 is feeling adventurous for CL). i8 writeout doesn't actually need this, I have patches to do without.

Edited by Alyssa Rosenzweig

Merge request reports