As you're debugging register allocation, you may have changed the
intervals and not recomputed yet. Just skip the dump in that case.
/* Live ranges of temps. */
int *temp_start, *temp_end;
+ bool live_intervals_valid;
uint32_t *uniform_data;
enum quniform_contents *uniform_contents;
}
c->cursor = vir_after_inst(inst);
+ c->live_intervals_valid = false;
}
/* Updates inst to write to a new temporary, emits it, and notes the def. */
list_del(&qinst->link);
free(qinst);
+
+ c->live_intervals_valid = false;
}
struct qreg
vir_for_each_block(block, c) {
fprintf(stderr, "BLOCK %d:\n", block->index);
vir_for_each_inst(inst, block) {
- if (c->temp_start) {
+ if (c->live_intervals_valid) {
bool first = true;
for (int i = 0; i < c->num_temps; i++) {
fprintf(stderr, " ");
}
- if (c->temp_end) {
+ if (c->live_intervals_valid) {
bool first = true;
for (int i = 0; i < c->num_temps; i++) {
;
vir_compute_start_end(c, c->num_temps);
+
+ c->live_intervals_valid = true;
}