This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: New Optimization: Partitioning hot & cold basic blocks
- From: Geoff Keating <geoffk at desire dot geoffk dot org>
- To: law at redhat dot com
- Cc: rth at redhat dot com, ctice at apple dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 18:30:30 -0800
- Subject: Re: PATCH: New Optimization: Partitioning hot & cold basic blocks
- References: <200401292346.i0TNkZdr010169@speedy.slc.redhat.com>
> From: firstname.lastname@example.org
> Date: Thu, 29 Jan 2004 16:46:35 -0700
> In message <email@example.com>, Geoff Keating writes:
> >> Although... you can't insert new uses of the GP register as late as
> >> bb-reorder. After peep2/flow2 you're pretty much SOL wrt adding new
> >> references to symbols. By then we've removed dead loads of the GP
> >> that may have been left over from reload.
> >You can't even allocate a register to be used in indirect_jump at this
> >point in the compile. If you can fall back to anything at all, it
> >must be jump, not indirect_jump.
> Not necessarily.
> First, you can look at hard register live information and see if a
> suitable register is available. If so, use it.
> Second, if no hard register is available, you can peek at the target
> and see if there is a register which is set before it is used. If so,
> you can use that register to hold the target address.
> Finally, if you're doing hot/cold splitting you can reserve a stack slot for
> holding a register. You then just need to store a well known register
> into your reserved stack slot, load the target address into the register,
> jump and restore the stack slot. We use this kind of stuff in pathological
> cases on the PA.
On rs6000, there are exactly two possible registers, which both have
other special uses. I'm not sure what other targets are like.
- Geoffrey Keating <firstname.lastname@example.org>