From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16749 invoked by alias); 14 Jan 2015 10:17:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16727 invoked by uid 89); 14 Jan 2015 10:17:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: foss-mx-na.foss.arm.com Received: from foss-mx-na.foss.arm.com (HELO foss-mx-na.foss.arm.com) (217.140.108.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Jan 2015 10:17:01 +0000 Received: from foss-smtp-na-1.foss.arm.com (unknown [10.80.61.8]) by foss-mx-na.foss.arm.com (Postfix) with ESMTP id 637FD238; Wed, 14 Jan 2015 04:16:58 -0600 (CST) Received: from collaborate-mta1.arm.com (highbank-bc01-b06.austin.arm.com [10.112.81.134]) by foss-smtp-na-1.foss.arm.com (Postfix) with ESMTP id 48A2B5FAD7; Wed, 14 Jan 2015 04:16:56 -0600 (CST) Received: from [10.1.209.42] (e105545-lin.cambridge.arm.com [10.1.209.42]) by collaborate-mta1.arm.com (Postfix) with ESMTPS id A8DC513F796; Wed, 14 Jan 2015 04:16:55 -0600 (CST) Message-ID: <54B64217.9020900@arm.com> Date: Wed, 14 Jan 2015 10:32:00 -0000 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hale Wang , GCC Patches CC: Richard Earnshaw Subject: Re: [PATCH] [ARM] Tune the max_cond_insns/branch_cost for Cortex-M7 References: <004801d02fe2$ebebfc10$c3c3f430$@arm.com> In-Reply-To: <004801d02fe2$ebebfc10$c3c3f430$@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg01000.txt.bz2 On 14/01/15 10:14, Hale Wang wrote: > Hi, > > This patch is tuned particularly for benchmark performance on cortex-m7. > Tested with GCC regression test, no regressions. Is it ok for trunk? > > BR, > Hale Wang > > gcc/ChangeLog > 2014-12-24 Hale Wang > > * config/arm/arm.c: Tune the max_cond_insns/branch_cost for > Cortex-M7. > > diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c > index 8193bf1..d52fcbd 100644 > --- a/gcc/config/arm/arm.c > +++ b/gcc/config/arm/arm.c > @@ -287,6 +287,7 @@ static unsigned int arm_autovectorize_vector_sizes > (void); > static int arm_default_branch_cost (bool, bool); > static int arm_cortex_a5_branch_cost (bool, bool); > static int arm_cortex_m_branch_cost (bool, bool); > +static int arm_cortex_m7_branch_cost (bool, bool); > > static bool arm_vectorize_vec_perm_const_ok (machine_mode vmode, > const unsigned char *sel); > @@ -1967,10 +1968,10 @@ const struct tune_params arm_cortex_m7_tune = > &v7m_extra_costs, > NULL, /* Sched adj cost. > */ > 0, /* Constant limit. */ > - 0, /* Max cond insns. */ > + 1, /* Max cond insns. */ > ARM_PREFETCH_NOT_BENEFICIAL, > true, /* Prefer constant > pool. */ > - arm_cortex_m_branch_cost, > + arm_cortex_m7_branch_cost, > false, /* Prefer LDRD/STRD. */ > {true, true}, /* Prefer non short > circuit. */ > &arm_default_vec_cost, /* Vectorizer costs. */ > @@ -12015,6 +12016,12 @@ arm_cortex_m_branch_cost (bool speed_p, bool > predictable_p) > : arm_default_branch_cost (speed_p, predictable_p); > } > > +static int > +arm_cortex_m7_branch_cost (bool speed_p, bool predictable_p) > +{ > + return speed_p ? 0 : arm_default_branch_cost (speed_p, predictable_p); > +} > + > static bool fp_consts_inited = false; > > static REAL_VALUE_TYPE value_fp0; > OK. Ramana