public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tamar Christina <Tamar.Christina@arm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>,
	nd <nd@arm.com>, James Greenhalgh	<James.Greenhalgh@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: RE: [PATCH][GCC][AArch64] Have empty HWCAPs string ignored during native feature detection
Date: Wed, 27 Feb 2019 13:26:00 -0000	[thread overview]
Message-ID: <DB6PR0802MB23091BE47B585C8FDF3C4A7DFF740@DB6PR0802MB2309.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <DB6PR0802MB23099CBF38203923250E28A2FF680@DB6PR0802MB2309.eurprd08.prod.outlook.com>

Ping.

> -----Original Message-----
> From: Tamar Christina <Tamar.Christina@arm.com>
> Sent: Thursday, February 7, 2019 10:43
> To: Tamar Christina <Tamar.Christina@arm.com>; Jakub Jelinek
> <jakub@redhat.com>
> Cc: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>; gcc-patches@gcc.gnu.org;
> nd <nd@arm.com>; James Greenhalgh <James.Greenhalgh@arm.com>;
> Richard Earnshaw <Richard.Earnshaw@arm.com>; Marcus Shawcroft
> <Marcus.Shawcroft@arm.com>
> Subject: RE: [PATCH][GCC][AArch64] Have empty HWCAPs string ignored
> during native feature detection
> 
> Hi All,
> 
> Since this hasn't been reviewed yet anyway I've updated this patch to also fix
> the memory leaks etc.
> 
> --
> 
> This patch makes the feature detection code for AArch64 GCC not add
> features automatically when the feature had no hwcaps string to match
> against.
> 
> This means that -mcpu=native no longer adds feature flags such as +profile.
> The behavior wasn't noticed before because at the time +profile was added
> a bug was preventing any feature bits from being added by native detections.
> 
> The loop has also been changed as Jakub specified in order to avoid a
> memory leak that was present in the existing code and to be slightly more
> efficient.
> 
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
> 
> Ok for trunk?
> 
> Thanks,
> Tamar
> 
> gcc/ChangeLog:
> 
> 2019-02-07  Tamar Christina  <tamar.christina@arm.com>
> 
> 	PR target/88530
> 	* config/aarch64/aarch64-option-extensions.def: Document it.
> 	* config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip
> feature
> 	if empty hwcaps.
> 
> gcc/testsuite/ChangeLog:
> 
> 2019-02-07  Tamar Christina  <tamar.christina@arm.com>
> 
> 	PR target/88530
> 	* gcc.target/aarch64/options_set_10.c: New test.
> 
> > -----Original Message-----
> > From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org>
> On
> > Behalf Of Tamar Christina
> > Sent: Wednesday, January 30, 2019 14:48
> > To: Jakub Jelinek <jakub@redhat.com>
> > Cc: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>;
> > gcc-patches@gcc.gnu.org; nd <nd@arm.com>; James Greenhalgh
> > <James.Greenhalgh@arm.com>; Richard Earnshaw
> > <Richard.Earnshaw@arm.com>; Marcus Shawcroft
> > <Marcus.Shawcroft@arm.com>
> > Subject: Re: [PATCH][GCC][AArch64] Have empty HWCAPs string ignored
> > during native feature detection
> >
> > Hi Jakub,
> >
> > On Wed, Jan 30, 2019 at 02:06:01PM +0000, Tamar Christina wrote:
> > > > Thanks for the feedback, but I think those are changes for another
> patch.
> > >
> > > At least the memory leak is something that should be fixed even in
> > > stage4 IMNSHO.
> >
> > I'll provide a separate patch for this then.
> >
> > > Anyway, will defer to aarch64 maintainers here.
> >
> > > Just one question, for the *feat_string == '\0' case, is continue
> > > what you want, rather than just enabled = false; and doing the
> >  > extension_flags &= ~(aarch64_extensions[i].flag);
> > > later on?
> >
> > Yeah, because the feature may be on by default due to another
> > extension, in which case you would erroneously turn it off. The
> > absence of an HWCAPS shouldn't pro-actively disable an extension.
> >
> > Regards,
> > Tamar

  reply	other threads:[~2019-02-27 13:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 13:36 Tamar Christina
2019-01-10 16:57 ` Kyrill Tkachov
2019-01-23 16:28   ` Jakub Jelinek
2019-01-30 14:10     ` Tamar Christina
2019-01-30 14:24       ` Jakub Jelinek
2019-01-30 15:10         ` Tamar Christina
2019-02-07 10:43           ` Tamar Christina
2019-02-27 13:26             ` Tamar Christina [this message]
2019-02-27 18:43             ` James Greenhalgh
2019-02-27 18:44               ` Tamar Christina
2019-03-04 13:32                 ` Christophe Lyon
2019-03-04 13:36                   ` Tamar Christina
2019-03-04 13:38                   ` Jakub Jelinek
2019-03-04 13:43                     ` Tamar Christina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6PR0802MB23091BE47B585C8FDF3C4A7DFF740@DB6PR0802MB2309.eurprd08.prod.outlook.com \
    --to=tamar.christina@arm.com \
    --cc=James.Greenhalgh@arm.com \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=kyrylo.tkachov@foss.arm.com \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).