mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
freedreno/ir3: Drop foreach_bit() macro
Now that there is a global one in util/bitscan.h Note this version had an extra assert which is not really suitable to a generic foreach_bit().. just move the assert to the two usages of the iterator macro. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>
This commit is contained in:
parent
025b57524f
commit
e5a64e34d8
1 changed files with 4 additions and 7 deletions
|
|
@ -77,9 +77,6 @@ struct ir3_postsched_node {
|
|||
#define foreach_sched_node(__n, __list) \
|
||||
list_for_each_entry(struct ir3_postsched_node, __n, __list, dag.link)
|
||||
|
||||
#define foreach_bit(b, mask) \
|
||||
for (uint32_t _m = ({debug_assert((mask) >= 1); (mask);}); _m && ({(b) = u_bit_scan(&_m); 1;});)
|
||||
|
||||
static void
|
||||
schedule(struct ir3_postsched_ctx *ctx, struct ir3_instruction *instr)
|
||||
{
|
||||
|
|
@ -402,8 +399,6 @@ static void
|
|||
calculate_deps(struct ir3_postsched_deps_state *state,
|
||||
struct ir3_postsched_node *node)
|
||||
{
|
||||
int b;
|
||||
|
||||
/* Add dependencies on instructions that previously (or next,
|
||||
* in the reverse direction) wrote any of our src registers:
|
||||
*/
|
||||
|
|
@ -418,7 +413,8 @@ calculate_deps(struct ir3_postsched_deps_state *state,
|
|||
add_reg_dep(state, node, reg, arr->reg + i, false);
|
||||
}
|
||||
} else {
|
||||
foreach_bit (b, reg->wrmask) {
|
||||
assert(reg->wrmask >= 1);
|
||||
u_foreach_bit (b, reg->wrmask) {
|
||||
add_reg_dep(state, node, reg, reg->num + b, false);
|
||||
|
||||
struct ir3_postsched_node *dep = dep_reg(state, reg->num + b);
|
||||
|
|
@ -450,7 +446,8 @@ calculate_deps(struct ir3_postsched_deps_state *state,
|
|||
add_reg_dep(state, node, reg, arr->reg + i, true);
|
||||
}
|
||||
} else {
|
||||
foreach_bit (b, reg->wrmask) {
|
||||
assert(reg->wrmask >= 1);
|
||||
u_foreach_bit (b, reg->wrmask) {
|
||||
add_reg_dep(state, node, reg, reg->num + b, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue