This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH RFC] Finer grained reg classes.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: gcc-patches at gcc dot gnu dot org, ebotcazou at adacore dot com, rth at twiddle dot net
- Date: Sat, 27 Apr 2013 10:09:17 +0100
- Subject: Re: [PATCH RFC] Finer grained reg classes.
- References: <20130319 dot 113349 dot 779301153261368350 dot davem at davemloft dot net>
David Miller <email@example.com> writes:
> So this patch tries to rework the semantics of hard register classes,
> such that if a hard register is present in the set it is implied that
> the rest of the registers in a multi-register group are present as
> well. So we can add a register class called EVEN_REGS and only have
> to set the even register bits.
It would be great if this could be made to work. I think the main
problem is going to be stopping registers from other register files
being included accidentally. E.g. if on a 32-bit target you store
a 128-bit value in an even GPR, using the GPR class itself ensures
that all four registers are GPRs. The last even GPR is automatically
disallowed. If instead we say that only the first register needs to
belong to the class, I assume we'd need both an EVEN_REGS and an
I must admit I don't really understand why HARD_REGNO_MODE_OK() is a
problem for IRA and LRA. Although they work on register classes,
most of the internal calculations are done on register sets,
which can be masked as needed. E.g. ira_prohibited_class_mode_regs
already takes HARD_REGNO_MODE_OK() into account. And even if the
register class itself only gives the first register, all the conflict
calculations are still going to need to include all registers.
I'm probably repeating a previous discussion here, sorry.