MIPS & register allocation question
Steve Ellcey
sellcey@imgtec.com
Tue Feb 26 22:59:00 GMT 2013
I was looking at MIPS register allocation and I noticed an odd thing.
There is a definition of REG_ALLOC_ORDER in mips.h but in
mips_order_regs_for_local_alloc (mips.c), we do not use this ordering,
we just have:
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
reg_alloc_order[i] = i;
I was wondering why we don't use something like ARM has.
I.e.:
const int mips_reg_alloc_order[] = REG_ALLOC_ORDER;
memcpy(reg_alloc_order, mips_reg_alloc_order, sizeof (reg_alloc_order));
Steve Ellcey
sellcey@imgtec.com
More information about the Gcc
mailing list