Hi, all, There was a patch to have HONOR_REG_ALLOC_ORDER using C expression: http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01546.html http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00048.html
This is very helpful to nds32 port since we can decide when to apply HONOR_REG_ALLOC_ORDER against code size and performance trade-off. Currently, HONOR_REG_ALLOC_ORDER only benefits code size in nds32 port. ChangeLog and patch are as below, committed as Rev.210137: Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 210135) +++ gcc/ChangeLog (revision 210137) @@ -1,3 +1,8 @@ +2014-05-07 Chung-Ju Wu <jasonw...@gmail.com> + + * config/nds32/nds32.h (HONOR_REG_ALLOC_ORDER): Have it in favor + of using optimize_size. + 2014-05-06 Mike Stump <mikest...@comcast.net> * wide-int.h (wi::int_traits <HOST_WIDE_INT>): Always define. Index: gcc/config/nds32/nds32.h =================================================================== --- gcc/config/nds32/nds32.h (revision 210135) +++ gcc/config/nds32/nds32.h (revision 210137) @@ -553,7 +553,7 @@ /* Tell IRA to use the order we define rather than messing it up with its own cost calculations. */ -#define HONOR_REG_ALLOC_ORDER 1 +#define HONOR_REG_ALLOC_ORDER optimize_size /* The number of consecutive hard regs needed starting at reg "regno" for holding a value of mode "mode". */ Best regards, jasonwucj