Avoid iteration over an empty bitset

This commit is contained in:
Dmitry Stogov 2023-05-03 12:30:05 +03:00
parent 1bbee7b9da
commit d30f523c62

16
ir_ra.c
View File

@ -612,15 +612,15 @@ int ir_compute_live_ranges(ir_ctx *ctx)
}
}
}
}
/* for each opd in live */
IR_BITSET_FOREACH(live, len, i) {
/* intervals[opd].addRange(b.from, b.to) */
ir_add_live_range(ctx, i, IR_VOID,
IR_START_LIVE_POS_FROM_REF(bb->start),
IR_END_LIVE_POS_FROM_REF(bb->end));
} IR_BITSET_FOREACH_END();
/* for each opd in live */
IR_BITSET_FOREACH(live, len, i) {
/* intervals[opd].addRange(b.from, b.to) */
ir_add_live_range(ctx, i, IR_VOID,
IR_START_LIVE_POS_FROM_REF(bb->start),
IR_END_LIVE_POS_FROM_REF(bb->end));
} IR_BITSET_FOREACH_END();
}
if (bb->successors_count == 1) {
/* for each phi function phi of successor */