mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
pan/bi: Use nr_{srcs,dests} in bi_foreach_{src,dest}
This avoids crawling sources that must be null. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
This commit is contained in:
parent
9176182a1e
commit
63051b68d7
1 changed files with 2 additions and 2 deletions
|
|
@ -1026,10 +1026,10 @@ bi_node_to_index(unsigned node, unsigned node_count)
|
|||
util_dynarray_foreach(&(blk)->predecessors, bi_block *, v)
|
||||
|
||||
#define bi_foreach_src(ins, v) \
|
||||
for (unsigned v = 0; v < ARRAY_SIZE(ins->src); ++v)
|
||||
for (unsigned v = 0; v < ins->nr_srcs; ++v)
|
||||
|
||||
#define bi_foreach_dest(ins, v) \
|
||||
for (unsigned v = 0; v < ARRAY_SIZE(ins->dest); ++v)
|
||||
for (unsigned v = 0; v < ins->nr_dests; ++v)
|
||||
|
||||
#define bi_foreach_instr_and_src_in_tuple(tuple, ins, s) \
|
||||
bi_foreach_instr_in_tuple(tuple, ins) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue