From patchwork Fri Jun 25 10:40:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 56900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 307BEB6F10 for ; Fri, 25 Jun 2010 20:41:08 +1000 (EST) Received: (qmail 4386 invoked by alias); 25 Jun 2010 10:41:06 -0000 Received: (qmail 4372 invoked by uid 22791); 25 Jun 2010 10:41:05 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.17.165) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Jun 2010 10:41:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id o5PAew9R001159 for ; Fri, 25 Jun 2010 10:40:58 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5PAewPo1622148 for ; Fri, 25 Jun 2010 12:40:58 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o5PAevFL017645 for ; Fri, 25 Jun 2010 12:40:58 +0200 Received: from cborntra.localnet (dyn-9-152-224-25.boeblingen.de.ibm.com [9.152.224.25]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o5PAevmh017634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Jun 2010 12:40:57 +0200 From: Christian Borntraeger To: "Fang, Changpeng" , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Enabling Software Prefetching by Default at -O3 Date: Fri, 25 Jun 2010 12:40:53 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.35-rc2-self-00089-g63a07cb; KDE/4.4.4; x86_64; ; ) Cc: Andreas Krebbel , uweigand@de.ibm.com References: <4C1D2304.5080007@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <201006251240.54401.borntraeger@de.ibm.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Am Donnerstag 24 Juni 2010, 23:18:28 schrieb Fang, Changpeng: > Hi, > > Attached is the version of the patch that turns prefetching on at -O3 for AMD cpus > only. As discussed elsewhere in this thread, we use tri-state for -fprefetch-loop-arrays. > If this flag is not explicitly set, (for -O3) we turn it on in gcc/config/i386/i386.c > (override_options). > > Is this OK to commit now? Looks good. As soon as this is committed, somebody should commit the following fix that makes fno-prefetch-loop-arrays work again on s390. Andreas, Ulrich. Can you have a look and apply after Changpengs patch if ok. 2010-06-25 Christian Borntraeger * config/s390/s390.c (override_options): Adopt prefetching at -O3 to handle flag_prefetch_loop_arrays as a tristate. Index: gcc/config/s390/s390.c =================================================================== *** gcc/config/s390/s390.c.orig --- gcc/config/s390/s390.c *************** override_options (void) *** 1675,1683 **** set_param_value ("simultaneous-prefetches", 6); /* This cannot reside in optimization_options since HAVE_prefetch ! requires the arch flags to be evaluated already. */ ! if (HAVE_prefetch && optimize >= 3) ! flag_prefetch_loop_arrays = 1; } /* Map for smallest class containing reg regno. */ --- 1675,1684 ---- set_param_value ("simultaneous-prefetches", 6); /* This cannot reside in optimization_options since HAVE_prefetch ! requires the arch flags to be evaluated already. Since prefetching ! is benefitial on s390, we enable it if available. */ ! if (flag_prefetch_loop_arrays < 0 && HAVE_prefetch && optimize >= 3) ! flag_prefetch_loop_arrays = 1; } /* Map for smallest class containing reg regno. */