Commit 413fbed3 authored by Rémy Oudompheng's avatar Rémy Oudompheng

cmd/6g: cosmetic improvements to regopt debugging.

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/6528044
parent 57ad05db
...@@ -743,6 +743,9 @@ loop2: ...@@ -743,6 +743,9 @@ loop2:
brk: brk:
qsort(region, nregion, sizeof(region[0]), rcmp); qsort(region, nregion, sizeof(region[0]), rcmp);
if(debug['R'] && debug['v'])
dumpit("pass5", firstr);
/* /*
* pass 6 * pass 6
* determine used registers (paint2) * determine used registers (paint2)
...@@ -753,8 +756,16 @@ brk: ...@@ -753,8 +756,16 @@ brk:
bit = blsh(rgp->varno); bit = blsh(rgp->varno);
vreg = paint2(rgp->enter, rgp->varno); vreg = paint2(rgp->enter, rgp->varno);
vreg = allreg(vreg, rgp); vreg = allreg(vreg, rgp);
if(rgp->regno != 0) if(rgp->regno != 0) {
if(debug['R'] && debug['v']) {
Var *v;
v = var + rgp->varno;
print("registerize %N+%d (bit=%2d et=%2E) in %R\n",
v->node, v->offset, rgp->varno, v->etype, rgp->regno);
}
paint3(rgp->enter, rgp->varno, vreg, rgp->regno); paint3(rgp->enter, rgp->varno, vreg, rgp->regno);
}
rgp++; rgp++;
} }
...@@ -1027,7 +1038,7 @@ mkvar(Reg *r, Adr *a) ...@@ -1027,7 +1038,7 @@ mkvar(Reg *r, Adr *a)
v->node = node; v->node = node;
if(debug['R']) if(debug['R'])
print("bit=%2d et=%2d w=%d %#N %D\n", i, et, w, node, a); print("bit=%2d et=%2E w=%d %#N %D\n", i, et, w, node, a);
ostats.nvar++; ostats.nvar++;
bit = blsh(i); bit = blsh(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment