broadcom/vc5: Don't annotate dumps with stale live intervals.

As you're debugging register allocation, you may have changed the
intervals and not recomputed yet.  Just skip the dump in that case.
This commit is contained in:
Eric Anholt
2018-03-14 11:03:23 -07:00
parent facc3c6f58
commit 00910e3057
4 changed files with 8 additions and 2 deletions

View File

@@ -548,6 +548,7 @@ struct v3d_compile {
/* Live ranges of temps. */ /* Live ranges of temps. */
int *temp_start, *temp_end; int *temp_start, *temp_end;
bool live_intervals_valid;
uint32_t *uniform_data; uint32_t *uniform_data;
enum quniform_contents *uniform_contents; enum quniform_contents *uniform_contents;

View File

@@ -435,6 +435,7 @@ vir_emit(struct v3d_compile *c, struct qinst *inst)
} }
c->cursor = vir_after_inst(inst); 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. */ /* Updates inst to write to a new temporary, emits it, and notes the def. */
@@ -813,6 +814,8 @@ vir_remove_instruction(struct v3d_compile *c, struct qinst *qinst)
list_del(&qinst->link); list_del(&qinst->link);
free(qinst); free(qinst);
c->live_intervals_valid = false;
} }
struct qreg struct qreg

View File

@@ -321,7 +321,7 @@ vir_dump(struct v3d_compile *c)
vir_for_each_block(block, c) { vir_for_each_block(block, c) {
fprintf(stderr, "BLOCK %d:\n", block->index); fprintf(stderr, "BLOCK %d:\n", block->index);
vir_for_each_inst(inst, block) { vir_for_each_inst(inst, block) {
if (c->temp_start) { if (c->live_intervals_valid) {
bool first = true; bool first = true;
for (int i = 0; i < c->num_temps; i++) { for (int i = 0; i < c->num_temps; i++) {
@@ -342,7 +342,7 @@ vir_dump(struct v3d_compile *c)
fprintf(stderr, " "); fprintf(stderr, " ");
} }
if (c->temp_end) { if (c->live_intervals_valid) {
bool first = true; bool first = true;
for (int i = 0; i < c->num_temps; i++) { for (int i = 0; i < c->num_temps; i++) {

View File

@@ -347,4 +347,6 @@ vir_calculate_live_intervals(struct v3d_compile *c)
; ;
vir_compute_start_end(c, c->num_temps); vir_compute_start_end(c, c->num_temps);
c->live_intervals_valid = true;
} }