This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: extra machine-dependent passes
- To: Geoff Keating <geoffk at geoffk dot org>
- Subject: Re: PATCH: extra machine-dependent passes
- From: law at redhat dot com
- Date: Mon, 18 Jun 2001 08:00:05 -0700
- cc: DJ Delorie <dj at redhat dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <jmhexh4csv.fsf@geoffk.org>you write:
> DJ Delorie <dj@redhat.com> writes:
>
> > > I think you need to describe the issue to the folks on the gcc list
> > > before they can properly evaluate this patch.
> >
> > OK, here's the background: The port I'm working on has a few registers
> > that are similar to the MIPS gp register, but because of a shortage of
> > registers, they must be available for general use also. So, I emit a
> > move to a pseudo at the beginning of the function, much like the alpha
> > saves it's return address register, to keep track of that value.
>
> This sounds like something that would be useful in other ports than
> yours. Just about every port has a registers like this for doing PIC,
> and there are lots of ports with few registers available (for
> instance, x86 has both properties). Can you implement this is a
> generic way?
>
> It sounds like this would be best done at about the time of
> instantiate_virtual_regs; it's really just passing a hidden argument
> to the function.
If we really need something like this, then let's write a pass to do it,
not insert the pre-alloc hook DJ suggested which is big enough to drive
a mac truck through.
jeff