From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12240 invoked by alias); 10 Dec 2014 13:59:03 -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 12230 invoked by uid 89); 10 Dec 2014 13:59:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Dec 2014 13:59:01 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Wed, 10 Dec 2014 13:58:58 +0000 Received: from [10.1.203.158] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 10 Dec 2014 13:58:55 +0000 Message-ID: <5488519F.2070803@arm.com> Date: Wed, 10 Dec 2014 13:59:00 -0000 From: Renlin Li User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Marcus Shawcroft CC: "gcc-patches@gcc.gnu.org" , Ramana Radhakrishnan Subject: [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified." References: <54770A95.2000108@arm.com> In-Reply-To: X-MC-Unique: 114121013585805601 Content-Type: multipart/mixed; boundary="------------090005060803050901040905" X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00919.txt.bz2 This is a multi-part message in MIME format. --------------090005060803050901040905 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-length: 874 On 04/12/14 10:27, Marcus Shawcroft wrote: > On 27 November 2014 at 11:27, Renlin Li wrote: > >> gcc/ChangeLog: >> >> 2014-11-27 Renlin Li >> >> * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define >> selected_tune. >> (aarch64_override_options): Use selected_cpu's tuning. >> > OK and this is also broken in 4.9, could you prepare a backport please. /= Marcus > This is a backport patch of=20 https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00287.html aarch64-none-elf has been built and tested on the model, no issue. Okay for branch 4.9? Regards, Renlin Li gcc/ChangeLog: 2014-12-10 Renlin Li * config/aarch64/aarch64.c (aarch64_parse_cpu): Remove=20 selected_tune assignment as this will be done later. (aarch64_override_options): Use selected_cpu's tuning. --------------090005060803050901040905 Content-Type: text/x-patch; name=3.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="3.patch" Content-length: 820 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 1809513..0a8c303 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -6613,7 +6613,6 @@ aarch64_parse_cpu (void) if (strlen (cpu->name) =3D=3D len && strncmp (cpu->name, str, len) = =3D=3D 0) { selected_cpu =3D cpu; - selected_tune =3D cpu; aarch64_isa_flags =3D selected_cpu->flags; =20 if (ext !=3D NULL) @@ -6709,9 +6708,8 @@ aarch64_override_options (void) =20 gcc_assert (selected_cpu); =20 - /* The selected cpu may be an architecture, so lookup tuning by core ID.= */ if (!selected_tune) - selected_tune =3D &all_cores[selected_cpu->core]; + selected_tune =3D selected_cpu; =20 aarch64_tune_flags =3D selected_tune->flags; aarch64_tune =3D selected_tune->core;= --------------090005060803050901040905--