This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
MIPS & register allocation question
- From: "Steve Ellcey " <sellcey at imgtec dot com>
- To: <gcc at gcc dot gnu dot org>
- Cc: <rsandiford at googlemail dot com>
- Date: Tue, 26 Feb 2013 14:59:29 -0800
- Subject: MIPS & register allocation question
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