This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: New Optimization: Partitioning hot & cold basic blocks

> From:
> Date: Thu, 29 Jan 2004 16:46:35 -0700
> In message <>, 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 <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]