This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [new-regalloc-branch] IR spilling, opti+ coal., incremental ...
- From: Michael Matz <matz at kde dot org>
- To: Daniel Berlin <dan at dberlin dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 5 Jan 2002 05:51:06 +0100 (MET)
- Subject: Re: [new-regalloc-branch] IR spilling, opti+ coal., incremental ...
Hi,
On Fri, 4 Jan 2002, Daniel Berlin wrote:
> infinite loop in init_ra.
Phew. A simple one ;) Or not.
> If GET_MODE_SIZE (i) is 0, then hard_regno_mode_ok is okay, but
> hard_regno_nregs is 0.
This seems extraordinary strange to me. A sizeless mode which is Ok for
some registers, but needing none of them. Hmm.
> Would you rather i fix hard_regno_mode_ok to say these modes are not okay
> for anything, or just add a GET_MODE_SIZE (i) > 0 in the for (i = 0; i <
> NUM_MACHINE_MODES) loop?
Hmm I don't know. If it really is correct for PPC to have modes which are
ok for some registers, but still have hard_regno_nregs[] being 0 for them,
then that hunk seems to be the most correct:
(Normally it seems strange to me to allow say reg 2 for XYmode, but then
it takes no registers at all to hold values of XYmode in reg 2)
@@ -8488,6 +8488,8 @@ init_ra (void)
if (HARD_REGNO_MODE_OK (reg, i))
{
int size = HARD_REGNO_NREGS (reg, i);
+ if (!size)
+ reg++;
while (size-- && reg < FIRST_PSEUDO_REGISTER)
{
SET_HARD_REG_BIT (rs, reg);
The only thing is, that I don't know, if those registers are now OK for
that mode or not. If they are Ok, then we would need to handle size==0 as
if size==1, i.e:
if (!size)
size++;
Hmm, I think the latter is the best, at least if PPC is correct.
Ciao,
Michael.