freedreno/ir3: helpful iterator macros
authorRob Clark <robclark@freedesktop.org>
Mon, 2 Feb 2015 17:54:25 +0000 (12:54 -0500)
committerRob Clark <robclark@freedesktop.org>
Sun, 8 Mar 2015 21:42:43 +0000 (17:42 -0400)
commitf8f7548f466509bf881db1826ef6dd23ffe2acdf
tree13d3cd580e757965f3fbd0120c3130ee654132d0
parent26b79ac3e40624726bff5101dfe892d3ee2ba607
freedreno/ir3: helpful iterator macros

I remembered that we are using c99.. which makes some sugary iterator
macros easier.  So introduce iterator macros to iterate all src
registers and all SSA src instructions.  The _n variants also return
the src #, since there are a handful of places that need this.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3.h
src/gallium/drivers/freedreno/ir3/ir3_cp.c
src/gallium/drivers/freedreno/ir3/ir3_depth.c
src/gallium/drivers/freedreno/ir3/ir3_dump.c
src/gallium/drivers/freedreno/ir3/ir3_flatten.c
src/gallium/drivers/freedreno/ir3/ir3_group.c
src/gallium/drivers/freedreno/ir3/ir3_legalize.c
src/gallium/drivers/freedreno/ir3/ir3_ra.c
src/gallium/drivers/freedreno/ir3/ir3_sched.c