This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [fix] for: ra-colorize.c:1068: `inv_reg_alloc_order' undeclared
- From: Michael Matz <matz at suse dot de>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: <gcc at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Jul 2002 22:38:03 +0200 (CEST)
- Subject: Re: [fix] for: ra-colorize.c:1068: `inv_reg_alloc_order' undeclared
Hi,
On Wed, 24 Jul 2002, John David Anglin wrote:
> > +/* I don't want to clutter up the actual code with ifdef's. */
> > +#ifdef REG_ALLOC_ORDER
> > +#define inv_reg_alloc_order(c) inv_reg_alloc_order[c]
> > +#else
> > +#define inv_reg_alloc_order(c) c
>
> Should the above be
>
> #define inv_reg_alloc_order(c) FIRST_PSEUDO_REGISTER - 1 - (c)
>
> to obtain the inverse of lowest to highest ordering?
No, it's not inverse ordering, but inverse mapping, so that
inv_order[order[i]] == i. As this platform doesn't define REG_ALLOC_ORDER
it makes sense to begin allocating from the beginning, i.e. order[i]==i.
Ergo we have inv_order[order[i]] == inv_order[i] == i ;-)
Ciao,
Michael.