This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch 1/4 v3] Set sane prefetch values for s390x
- From: Christian Borntraeger <borntraeger at de dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "gcc-patches" <gcc-patches at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, Changpeng Fang <Changpeng dot Fang at amd dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Fri, 7 May 2010 17:25:43 +0200
- Subject: [patch 1/4 v3] Set sane prefetch values for s390x
- References: <20100507135917.951354000@de.ibm.com> <20100507140449.113382000@de.ibm.com> <20100507145354.GZ2817@tyan-ft48-01.lab.bos.redhat.com>
Am Freitag 07 Mai 2010 16:53:54 schrieb Jakub Jelinek:
> This patch (and other patches too) have formatting nits.
Ok. Updated Patch1:
Set sane prefetch values for s390x
This patch sets some sane values for -fprefetch-loop-arrays on s390.
Some of these settings also help to improve the performance of the
2 other performance patches.
Bootstrapped and tested on s390x-ibm-linux-gnu.
Ok to apply?
Christian.
2010-05-07 Christian Borntraeger <borntraeger@de.ibm.com>
* config/s390/s390.c: Define sane prefetch settings.
* config/s390/s390.h: Declare that read can use write prefetch.
Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c.orig
--- gcc/config/s390/s390.c
*************** override_options (void)
*** 1661,1666 ****
--- 1661,1679 ----
}
set_param_value ("max-pending-list-length", 256);
+ /* values for loop prefetching */
+ set_param_value ("l1-cache-line-size", 256);
+ if (!PARAM_SET_P (PARAM_L1_CACHE_SIZE))
+ set_param_value ("l1-cache-size", 128);
+ /* s390 has more than 2 levels and the size is much larger. Since
+ we are always running virtualized assume that we only get a small
+ part of the caches above l1. */
+ if (!PARAM_SET_P (PARAM_L2_CACHE_SIZE))
+ set_param_value ("l2-cache-size", 1500);
+ if (!PARAM_SET_P (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO))
+ set_param_value ("prefetch-min-insn-to-mem-ratio", 2);
+ if (!PARAM_SET_P (PARAM_SIMULTANEOUS_PREFETCHES))
+ set_param_value ("simultaneous-prefetches", 6);
}
/* Map for smallest class containing reg regno. */
Index: gcc/config/s390/s390.h
===================================================================
*** gcc/config/s390/s390.h.orig
--- gcc/config/s390/s390.h
*************** do { \
*** 989,992 ****
--- 989,994 ----
(TARGET_LONG_DISPLACEMENT? ((d) >= -524288 && (d) <= 524287) \
: ((d) >= 0 && (d) <= 4095))
+ /* Reads can reuse write prefetches, used by tree-ssa-prefetch-loops.c. */
+ #define READ_CAN_USE_WRITE_PREFETCH 1
#endif