commit 4bce97b16bc393e945c1955bf900364f5a456202
parent a7e7d73a7e41216436c334c89b7318e698e828f6
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 20 Oct 2015 16:19:00 -0400
rename spill field in Tmp to slot
Diffstat:
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/lisc/isel.c b/lisc/isel.c
@@ -60,7 +60,7 @@ rslot(Ref r, Fn *fn)
{
if (rtype(r) != RTmp)
return -1;
- return fn->tmp[r.val].spill;
+ return fn->tmp[r.val].slot;
}
static void
@@ -591,7 +591,7 @@ isel(Fn *fn)
int64_t sz;
for (n=0; n<fn->ntmp; n++)
- fn->tmp[n].spill = -1;
+ fn->tmp[n].slot = -1;
fn->slot = 0;
/* lower arguments */
@@ -644,7 +644,7 @@ isel(Fn *fn)
diag("isel: invalid alloc size");
sz = (sz + n-1) & -n;
sz /= 4;
- fn->tmp[i->to.val].spill = fn->slot;
+ fn->tmp[i->to.val].slot = fn->slot;
fn->slot += sz;
*i = (Ins){.op = ONop};
}
diff --git a/lisc/lisc.h b/lisc/lisc.h
@@ -244,7 +244,7 @@ struct Tmp {
char name[NString];
uint ndef, nuse;
uint cost;
- short spill;
+ short slot;
short wide;
int hint;
int phi;
diff --git a/lisc/rega.c b/lisc/rega.c
@@ -46,7 +46,7 @@ rref(RMap *m, int t)
r = rfind(m, t);
if (r == -1) {
- s = tmp[t].spill;
+ s = tmp[t].slot;
assert(s != -1 && "should have spilled");
return SLOT(s);
} else
diff --git a/lisc/spill.c b/lisc/spill.c
@@ -140,7 +140,7 @@ slot(int t)
if (t < Tmp0)
diag("spill: cannot spill register");
- s = tmp[t].spill;
+ s = tmp[t].slot;
if (s == -1) {
assert(NAlign == 3);
/* nice logic to pack stack slots
@@ -163,7 +163,7 @@ slot(int t)
slot4 = slot8;
}
s += locs;
- tmp[t].spill = s;
+ tmp[t].slot = s;
}
return SLOT(s);
}
@@ -375,7 +375,7 @@ spill(Fn *fn)
BCLR(v, t);
else
limit(&v, NReg-1, 0);
- s = tmp[t].spill;
+ s = tmp[t].slot;
}
j = opdesc[i->op].nmem;
if (!j && rtype(i->arg[0]) == RTmp)
@@ -394,7 +394,7 @@ spill(Fn *fn)
t = p->to.val;
if (BGET(v, t)) {
BCLR(v, t);
- s = tmp[t].spill;
+ s = tmp[t].slot;
if (s != -1)
store(p->to, s);
} else
diff --git a/lisc/util.c b/lisc/util.c
@@ -175,7 +175,7 @@ newtmp(char *prfx, Fn *fn)
t = fn->ntmp++;
vgrow(&fn->tmp, fn->ntmp);
sprintf(fn->tmp[t].name, "%s%d", prfx, ++n);
- fn->tmp[t].spill = -1;
+ fn->tmp[t].slot = -1;
return TMP(t);
}