This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, nds32] Committed: Enable HONOR_REG_ALLOC_ORDER when optimizing for size.
- From: Chung-Ju Wu <jasonwucj at gmail dot com>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Cc: kito at 0xlab dot org
- Date: Wed, 7 May 2014 15:48:13 +0800
- Subject: [PATCH, nds32] Committed: Enable HONOR_REG_ALLOC_ORDER when optimizing for size.
- Authentication-results: sourceware.org; auth=none
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 <jasonwucj@gmail.com>
+
+ * config/nds32/nds32.h (HONOR_REG_ALLOC_ORDER): Have it in favor
+ of using optimize_size.
+
2014-05-06 Mike Stump <mikestump@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