Hi Guys,

  I am applying the patch below to tweak the MEMORY_MOVE_COST macro for
  the RX port on the 4.5 branch.  Writing to memory is actually faster
  than reading on the RX, so the cost can be reduced as shown.

Cheers
  Nick

gcc/ChangeLog
2011-03-17  Nick Clifton  <ni...@redhat.com>

        * config/rx/rx.h (MEMORY_MOVE_COST): Reduce the cost of stores.

Index: gcc/config/rx/rx.h
===================================================================
--- gcc/config/rx/rx.h  (revision 171086)
+++ gcc/config/rx/rx.h  (working copy)
@@ -659,7 +659,8 @@
 
 #define BRANCH_COST(SPEED, PREDICT)           1
 #define REGISTER_MOVE_COST(MODE, FROM, TO)    2
-#define MEMORY_MOVE_COST(MODE, REGCLASS, IN) (2 + memory_move_secondary_cost 
(MODE, REGCLASS, IN))
+#define MEMORY_MOVE_COST(MODE, REGCLASS, IN) \
+  (((IN) ? 2 : 0) + memory_move_secondary_cost (MODE, REGCLASS, IN))
   
 #define SELECT_CC_MODE(OP,X,Y)  rx_select_cc_mode ((OP), (X), (Y))
 

Reply via email to