IRA patch: use ORDER_REGS_FOR_LOCAL_ALLOC

Jeff Law law@redhat.com
Tue Apr 27 22:58:00 GMT 2010


On 04/27/10 09:47, Bernd Schmidt wrote:
> ORDER_REGS_FOR_LOCAL_ALLOC is a target macros that allows ports to
> override the default for REG_ALLOC_ORDER.  On arm, this is used to
> prefer low registers over high ones when in Thumb mode.  However, this
> does not work at the moment, since the macro was used only in
> local-alloc, and that code was lost with IRA.  The patch below
> reintroduces a call to the macro.
>    
Well we no longer have a distinction between local & global allocation, 
so ISTM that ORDER_REGS_FOR_LOCAL_ALLOC has been overtaken by events.   
If you're getting better allocations with the patch then I would think 
that you need to be defining REG_ALLOC_ORDER for the thumb differently.

WRT prologue/epilogue costs -- that's an ongoing discussion between Vlad 
and myself -- there's definitely arguments for and against including 
those costs and if they're going to be included whether or not the cost 
should be scaled or not, how to account for the fact that the cost to 
save/restore can be spread across multiple insns, etc etc.    I don't 
think we've reached any kind of definitive answer on this -- meaning 
it'll probably be punted until we can do some extensive benchmarking 
across several platforms.

jeff



More information about the Gcc-patches mailing list