aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_legalize.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-06-28 07:30:35 -0700
committerEric Anholt <[email protected]>2019-08-28 15:25:19 -0700
commit06bc4875fff8ad144dbebebe53241da4655aecc6 (patch)
tree71f697c227f1d3e42d27d594d299bcf470d47e36 /src/freedreno/ir3/ir3_legalize.c
parentcfbde3282d9b881a8cb09dc7a9c2b25b69872e32 (diff)
freedreno/ir3: convert block->predecessors to set
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_legalize.c')
-rw-r--r--src/freedreno/ir3/ir3_legalize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c
index ae5547b6a52..e46d1214d60 100644
--- a/src/freedreno/ir3/ir3_legalize.c
+++ b/src/freedreno/ir3/ir3_legalize.c
@@ -90,8 +90,9 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
bool last_input_needs_ss = false;
/* our input state is the OR of all predecessor blocks' state: */
- for (unsigned i = 0; i < block->predecessors_count; i++) {
- struct ir3_legalize_block_data *pbd = block->predecessors[i]->data;
+ set_foreach(block->predecessors, entry) {
+ struct ir3_block *predecessor = (struct ir3_block *)entry->key;
+ struct ir3_legalize_block_data *pbd = predecessor->data;
struct ir3_legalize_state *pstate = &pbd->state;
/* Our input (ss)/(sy) state is based on OR'ing the output