Commit 3147d2c4 authored by Russ Cox's avatar Russ Cox

cmd/5c, cmd/6c, cmd/8c: make failure to optimize fatal

LGTM=bradfitz, dave, r
R=r, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/152250044
parent 8b7da4de
......@@ -406,7 +406,7 @@ loop2:
rgp->cost = change;
nregion++;
if(nregion >= NRGN) {
warn(Z, "too many regions");
fatal(Z, "too many regions");
goto brk;
}
rgp++;
......@@ -642,11 +642,8 @@ mkvar(Addr *a, int docon)
if(s)
if(s->name[0] == '.')
goto none;
if(nvar >= NVAR) {
if(debug['w'] > 1 && s)
warn(Z, "variable not optimized: %s", s->name);
goto none;
}
if(nvar >= NVAR)
fatal(Z, "variable not optimized: %s", s->name);
i = nvar;
nvar++;
v = &var[i];
......
......@@ -585,14 +585,11 @@ loop2:
}
rgp->cost = change;
nregion++;
if(nregion >= NRGN) {
warn(Z, "too many regions");
goto brk;
}
if(nregion >= NRGN)
fatal(Z, "too many regions");
rgp++;
}
}
brk:
qsort(region, nregion, sizeof(region[0]), rcmp);
/*
......@@ -808,11 +805,8 @@ mkvar(Reg *r, Addr *a)
goto out;
v++;
}
if(nvar >= NVAR) {
if(debug['w'] > 1 && s)
warn(Z, "variable not optimized: %s", s->name);
goto none;
}
if(nvar >= NVAR)
fatal(Z, "variable not optimized: %s", s->name);
i = nvar;
nvar++;
v = &var[i];
......
......@@ -518,7 +518,7 @@ loop2:
rgp->cost = change;
nregion++;
if(nregion >= NRGN) {
warn(Z, "too many regions");
fatal(Z, "too many regions");
goto brk;
}
rgp++;
......@@ -746,11 +746,8 @@ mkvar(Reg *r, Addr *a)
goto out;
v++;
}
if(nvar >= NVAR) {
if(debug['w'] > 1 && s)
warn(Z, "variable not optimized: %s", s->name);
goto none;
}
if(nvar >= NVAR)
fatal(Z, "variable not optimized: %s", s->name);
i = nvar;
nvar++;
v = &var[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