This is the mail archive of the gcc-patches@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]

IRA patch: use ORDER_REGS_FOR_LOCAL_ALLOC


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.

This still does not solve the problem in PR 42895.  IRA also has code to
add extra cost for call-saved registers if they haven't been used yet in
the function, and this prevents us from using low registers in some
cases.  Given that a port that defines REG_ALLOC_ORDER can take into
account whether a register is call-used or call-saved, I think it's best
if IRA does not override the port's choice of alloc order.  Hence, I've
made the extra cost calculation conditional.

Bootstrapped and regression tested on i686-linux.  SPEC2000 tested on
Cortex-A9; overall result unchanged with a few fluctuations up and down
in the individual benchmarks.  Ok?


Bernd

Attachment: ira-order.diff
Description: Text document


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