freedreno/ir3: simplify RA
authorRob Clark <robclark@freedesktop.org>
Sat, 25 Oct 2014 19:11:59 +0000 (15:11 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 8 Jan 2015 00:37:28 +0000 (19:37 -0500)
commit9a9f2a893b5e29a77d66671191653f0b4261f546
treecb18b6fe28568d5c1f728632b93f60e50bd2b203
parentdddfe6c21ee92f015b78060545f08239c331ceba
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@freedesktop.org>
src/gallium/drivers/freedreno/Makefile.sources
src/gallium/drivers/freedreno/ir3/ir3.h
src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
src/gallium/drivers/freedreno/ir3/ir3_compiler.c
src/gallium/drivers/freedreno/ir3/ir3_cp.c
src/gallium/drivers/freedreno/ir3/ir3_group.c [new file with mode: 0644]
src/gallium/drivers/freedreno/ir3/ir3_ra.c
src/gallium/drivers/freedreno/ir3/ir3_visitor.h [deleted file]