Some more optim (?)
This commit is contained in:
parent
f572b1fb35
commit
224ac1b8ff
|
@ -31,17 +31,18 @@ struct perm *
|
||||||
tuples(regls,nregneeded) rl_p *regls; {
|
tuples(regls,nregneeded) rl_p *regls; {
|
||||||
int class=0;
|
int class=0;
|
||||||
register i,j;
|
register i,j;
|
||||||
|
register struct reginfo *rp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First compute equivalence classes of registers.
|
* First compute equivalence classes of registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i=NREGS;--i>=0;) {
|
for (i=NREGS, rp = &machregs[NREGS-1];--i>=0;rp--) {
|
||||||
regclass[i] = class++;
|
regclass[i] = class++;
|
||||||
if (getrefcount(i, FALSE) == 0) {
|
if (getrefcount(i, FALSE) == 0) {
|
||||||
for (j=NREGS;--j>i;) {
|
for (j=NREGS;--j>i;) {
|
||||||
if (eqregclass(i,j) &&
|
if (eqregclass(i,j) &&
|
||||||
eqtoken(&machregs[i].r_contents,
|
eqtoken(&rp->r_contents,
|
||||||
&machregs[j].r_contents)) {
|
&machregs[j].r_contents)) {
|
||||||
regclass[i] = regclass[j];
|
regclass[i] = regclass[j];
|
||||||
break;
|
break;
|
||||||
|
@ -71,11 +72,13 @@ permute(index) {
|
||||||
for (i=0; i<maxindex; i++)
|
for (i=0; i<maxindex; i++)
|
||||||
if (regclass[rar[i]] != regclass[pp->p_rar[i]])
|
if (regclass[rar[i]] != regclass[pp->p_rar[i]])
|
||||||
goto diff;
|
goto diff;
|
||||||
for (i=0; i<maxindex; i++)
|
for (i=0; i<maxindex; i++) {
|
||||||
|
int rari = rar[i], p_rari = pp->p_rar[i];
|
||||||
for (j=0; j<i; j++)
|
for (j=0; j<i; j++)
|
||||||
if (clash(rar[i],rar[j]) !=
|
if (clash(rari,rar[j]) !=
|
||||||
clash(pp->p_rar[i],pp->p_rar[j]))
|
clash(p_rari,pp->p_rar[j]))
|
||||||
goto diff;
|
goto diff;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
diff: ;
|
diff: ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue