prefer lower indexes in register allocation, this avoids REX prefixes on

x86_64 when %r8 - %r15 are used (very light speedup expected)
This commit is contained in:
gbeauche 2006-02-26 18:58:18 +00:00
parent 91babf4bb5
commit dbc467e316

View File

@ -1409,7 +1409,8 @@ static int alloc_reg_hinted(int r, int size, int willclobber, int hint)
bestreg=-1;
when=2000000000;
for (i=N_REGS;i--;) {
/* XXX use a regalloc_order table? */
for (i=0;i<N_REGS;i++) {
badness=live.nat[i].touched;
if (live.nat[i].nholds==0)
badness=0;