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]

[Committed] S/390: Add definition of MOVE_RATIO


Hello,

the attached patch defines the MOVE_RATIO macro in the S/390 back end.
Only 31bit should be affected since the 64bit value should match the
default for archs with memmove patterns.  It is anyway re-defined for
64bit since the only thing I wanted to make sure here is that it is
half the size of the value for 31bit.

Please see my verbose comment in the patch for further explanation.

Bootstrapped on s390 and s390x.
No testsuite regressions.

This fixes the gcc.dg/memcpy-1.c testcase for s390.

Applied to mainline.

Bye,

-Andreas-


2008-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.h (MOVE_RATIO): Define new target macro.


Index: gcc/config/s390/s390.h
===================================================================
*** gcc/config/s390/s390.h.orig	2008-01-24 09:41:36.000000000 +0100
--- gcc/config/s390/s390.h	2008-01-24 15:39:06.000000000 +0100
*************** extern struct rtx_def *s390_compare_op0,
*** 815,820 ****
--- 815,830 ----
  /* Don't perform CSE on function addresses.  */
  #define NO_FUNCTION_CSE
  
+ /* This value is used in tree-sra to decide whether it might benefical
+    to split a struct move into several word-size moves.  For S/390
+    only small values make sense here since struct moves are relatively
+    cheap thanks to mvc so the small default value choosen for archs
+    with memmove patterns should be ok.  But this value is multiplied
+    in tree-sra with UNITS_PER_WORD to make a decision so we adjust it
+    here to compensate for that factor since mvc costs exactly the same
+    on 31 and 64 bit.  */
+ #define MOVE_RATIO (TARGET_64BIT? 2 : 4)
+ 
  
  /* Sections.  */
  


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