This is the mail archive of the gcc@gcc.gnu.org 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: Compact regsiter allocation


> From: Ian Lance Taylor <iant@google.com>

> To: Jamie Prescott <jpresss@yahoo.com>
> Cc: gcc@gcc.gnu.org
> Sent: Thursday, May 14, 2009 10:09:40 PM
> Subject: Re: Compact regsiter allocation
> 
> Jamie Prescott writes:
> 
> >> Normally gcc will allocate registers in the order they are listed in
> >> REG_ALLOC_ORDER, which defaults to increasing numeric order.  gcc won't
> >> normally allocate register sparsely.  That said, it is quite possible
> >> for gcc to allocate a register and then discover that it need not be
> >> allocated.  There isn't currently any way to request that gcc tighten up
> >> the register allocation.  That would probably require another
> >> optimization pass to consistently rename registers when there is a hole
> >> in the allocation order.
> >
> > Yep, usually it allocates compact, but I noticed that when there's some inline 
> assembly
> > with ad-hoc register naming, it starts generating holes.
> > The extra renaming pass, is it something available today?
> 
> No.
> 
> > If not, what is the best spot (in the normal GCC target hooks) to trigger it? 
> Where the
> > full insn tree is passed in such hook (if it's not a global)?
> 
> TARGET_MACHINE_DEPENDENT_REORG.  It will be invoked once for each
> function, and can access and modify the complete RTL insn tree.

Perfect, thanks!


- Jamie


      


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