diff options
author | Rob Clark <[email protected]> | 2019-10-24 12:05:56 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-11-12 13:55:03 -0800 |
commit | c00a67171c99a885ffa46aff31f9cfa165947d78 (patch) | |
tree | deaa4804159bbc21bd7594c3a870354e2b4e2cbb /src/freedreno/ir3/ir3_sched.c | |
parent | b2417801e5d82cfac640086307599e81d5ae93e8 (diff) |
freedreno/ir3: add input/output iterators
We can at least get rid of the if-not-NULL check in a bunch of places.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_sched.c')
-rw-r--r-- | src/freedreno/ir3/ir3_sched.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c index f5b9d3bd6f5..a70251374ee 100644 --- a/src/freedreno/ir3/ir3_sched.c +++ b/src/freedreno/ir3/ir3_sched.c @@ -170,14 +170,9 @@ update_use_count(struct ir3 *ir) /* Shader outputs are also used: */ - for (unsigned i = 0; i < ir->noutputs; i++) { - struct ir3_instruction *out = ir->outputs[i]; - - if (!out) - continue; - + struct ir3_instruction *out; + foreach_output(out, ir) use_instr(out); - } } #define NULL_INSTR ((void *)~0) |