This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Coloring problem - Pass 0 for finding allocno costs
Hi,
On Thu, 18 Mar 2010, Frank Isamov wrote:
> From the h file:
>
> #define REG_CLASS_CONTENTS Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â\
> Â{
> Â Â Â Â Â Â \
> Â Â{0x00000000, 0x00000000, 0x00000000}, /* NO_REGS*/ Â Â Â Â Â\
> Â Â{0xFFFFFFFF, 0x0000FFFF, 0x00000000}, /* D_REGS*/ Â Â Â Â Â\
> Â Â{0x00000000, 0xFFFF0000, 0x0000FFFF}, /* R_REGS*/ Â Â Â Â Â \
>
> ABI requires use of R registers for arguments and return value. Other
> than that all of these instructions are more or less symmetrical in
> sense of using D or R.
If that is so, you're better off not using two different register classes
at all. Register classes are there to describe assymetry in the ISA
register file. For describing ABI constraints like argument or
caller-save registers look at FUNCTION_ARG, FUNCTION_ARG_REGNO_P,
FUNCTION_VALUE_REGNO_P and CALL_USED_REGISTERS (and some friends).
The compiler will e.g. try to make sure to first use call-clobbered
registers in leaf functions, so that they don't need to be saved/restored
in the prologue/epilogue. You don't need register classes to describe
this.
Ciao,
Michael.