Mesa (master): freedreno/ir3: simplify RA

Rob Clark robclark at kemper.freedesktop.org
Thu Jan 8 00:38:21 UTC 2015


Module: Mesa
Branch: master
Commit: 9a9f2a893b5e29a77d66671191653f0b4261f546
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a9f2a893b5e29a77d66671191653f0b4261f546

Author: Rob Clark <robclark at freedesktop.org>
Date:   Sat Oct 25 15:11:59 2014 -0400

freedreno/ir3: simplify RA

Group inputs/outputs, in addition to fanin/fanout, as they must also
exist in sequential scalar registers.  This lets us simplify RA by
working in terms of neighbor groups.

NOTE: has the slight problem that it can't optimize out mov's for things
like:

  MOV OUT[n], IN[m]

To avoid this, instead of trying to figure out what mov's we can
eliminate, we first remove all mov's prior to grouping, and then
re-insert mov's as needed while grouping inputs/outputs/fanins.
Eventually we'd prefer the frontend to not insert extra mov's in the
first place (so we don't have to bother removing them).  This is the
plan for an eventual NIR based frontend, so separate out the instr
grouping (which will still be needed for NIR frontend) from the mov
elimination (which won't).

Signed-off-by: Rob Clark <robclark at freedesktop.org>

---

 src/gallium/drivers/freedreno/Makefile.sources   |    4 +-
 src/gallium/drivers/freedreno/ir3/ir3.h          |   76 ++-
 src/gallium/drivers/freedreno/ir3/ir3_cmdline.c  |    8 +-
 src/gallium/drivers/freedreno/ir3/ir3_compiler.c |   72 ++-
 src/gallium/drivers/freedreno/ir3/ir3_cp.c       |  259 ++--------
 src/gallium/drivers/freedreno/ir3/ir3_group.c    |  228 +++++++++
 src/gallium/drivers/freedreno/ir3/ir3_ra.c       |  598 +++++++++-------------
 src/gallium/drivers/freedreno/ir3/ir3_visitor.h  |  154 ------
 8 files changed, 622 insertions(+), 777 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=9a9f2a893b5e29a77d66671191653f0b4261f546



More information about the mesa-commit mailing list