Re: [PATCH] driver: Also prune joined switches with negation

2019-09-26 Thread Kyrill Tkachov
On 9/25/19 12:10 PM, Kyrill Tkachov wrote: On 9/24/19 7:47 PM, Matt Turner wrote: > When -march=native is passed to host_detect_local_cpu to the backend, > it overrides all command lines after it.  That means > > $ gcc -march=native -march=armv8-a > > is treated as > > $ gcc -march=armv8-a -ma

Re: [PATCH] driver: Also prune joined switches with negation

2019-09-25 Thread Kyrill Tkachov
On 9/24/19 7:47 PM, Matt Turner wrote: When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it.  That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative and Rejec

Re: [PATCH] driver: Also prune joined switches with negation

2019-09-24 Thread Matt Turner
On Tue, Sep 24, 2019 at 1:24 AM Kyrill Tkachov wrote: > > Hi Matt, > > On 9/24/19 5:04 AM, Matt Turner wrote: > > When -march=native is passed to host_detect_local_cpu to the backend, > > it overrides all command lines after it. That means > > > > $ gcc -march=native -march=armv8-a > > > > is tre

[PATCH] driver: Also prune joined switches with negation

2019-09-24 Thread Matt Turner
When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it. That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative and RejectNegative to allow -march=armv8-a to overri

Re: [PATCH] driver: Also prune joined switches with negation

2019-09-24 Thread Kyrill Tkachov
Hi Matt, On 9/24/19 5:04 AM, Matt Turner wrote: When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it.  That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative a

[PATCH] driver: Also prune joined switches with negation

2019-09-23 Thread Matt Turner
When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it. That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative and RejectNegative to allow -march=armv8-a to overri

Re: PING^1: V2 [PATCH] driver: Also prune joined switches with negation

2019-02-21 Thread Jakub Jelinek
On Thu, Feb 21, 2019 at 10:40:09AM -0800, H.J. Lu wrote: > > Prune joined switches with Negative and RejectNegative to allow > > -march=skylake-avx512 to override previous -march=native on command-line. > > > > gcc/ > > > > PR driver/69471 > > * opts-common.c (prune_options): Also p

PING^1: V2 [PATCH] driver: Also prune joined switches with negation

2019-02-21 Thread H.J. Lu
On Thu, Feb 14, 2019 at 5:51 AM H.J. Lu wrote: > > On Thu, Feb 14, 2019 at 12:03:30PM +0100, Jakub Jelinek wrote: > > On Wed, Feb 13, 2019 at 06:27:51PM -0800, H.J. Lu wrote: > > > --- a/gcc/doc/options.texi > > > +++ b/gcc/doc/options.texi > > > @@ -227,7 +227,10 @@ options, their @code{Negative}

Re: V2 [PATCH] driver: Also prune joined switches with negation

2019-02-14 Thread H.J. Lu
On Thu, Feb 14, 2019 at 12:03:30PM +0100, Jakub Jelinek wrote: > On Wed, Feb 13, 2019 at 06:27:51PM -0800, H.J. Lu wrote: > > --- a/gcc/doc/options.texi > > +++ b/gcc/doc/options.texi > > @@ -227,7 +227,10 @@ options, their @code{Negative} properties should form > > a circular chain. > > For exam

Re: V2 [PATCH] driver: Also prune joined switches with negation

2019-02-14 Thread Jakub Jelinek
On Wed, Feb 13, 2019 at 06:27:51PM -0800, H.J. Lu wrote: > --- a/gcc/doc/options.texi > +++ b/gcc/doc/options.texi > @@ -227,7 +227,10 @@ options, their @code{Negative} properties should form a > circular chain. > For example, if options @option{-@var{a}}, @option{-@var{b}} and > @option{-@var{c

V2 [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread H.J. Lu
On Thu, Feb 14, 2019 at 12:15:53AM +0100, Jakub Jelinek wrote: > On Wed, Feb 13, 2019 at 03:08:01PM -0800, H.J. Lu wrote: > > > How does this test verify that both -fno-builtin-* options are in effect? > > > That is, how does it fail if you remove either or both of those options? > > > > > > > Wit

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread Jakub Jelinek
On Wed, Feb 13, 2019 at 03:08:01PM -0800, H.J. Lu wrote: > > How does this test verify that both -fno-builtin-* options are in effect? > > That is, how does it fail if you remove either or both of those options? > > > > Without -fno-builtin-free -fno-builtin-malloc As you haven't discovered any u

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread H.J. Lu
On Wed, Feb 13, 2019 at 2:54 PM Joseph Myers wrote: > > On Wed, 13 Feb 2019, H.J. Lu wrote: > > > Like this? > > This patch is missing any updates to options.texi to discuss the > interation of Negative and RejectNegative with Joined. I will add something. > > diff --git a/gcc/testsuite/gcc.dg/p

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread Joseph Myers
On Wed, 13 Feb 2019, H.J. Lu wrote: > Like this? This patch is missing any updates to options.texi to discuss the interation of Negative and RejectNegative with Joined. > diff --git a/gcc/testsuite/gcc.dg/pr69471-1.c > b/gcc/testsuite/gcc.dg/pr69471-1.c > new file mode 100644 > index 0

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread H.J. Lu
through bogus warnings that all of > them are in effect. > fbuiltin- is > C ObjC C++ ObjC++ Joined > and so neg_index is not -1, but the option index itself, but that is what > the patch wants to use for march= etc. too. > So, do we want a new *.opt flag that would enable this behavior, or key >

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-13 Thread Jakub Jelinek
On Wed, Feb 13, 2019 at 08:43:45AM +0100, Jakub Jelinek wrote: > > It seems right in the march= case to handle that combination as > > -march=foobar - but it's less clear if that must always be the case for > > Joined options with negative versions (at least, the semantics would need > > definin

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread Jakub Jelinek
On Wed, Feb 13, 2019 at 12:43:32AM +, Joseph Myers wrote: > On Wed, 13 Feb 2019, Jakub Jelinek wrote: > > > On Tue, Feb 12, 2019 at 11:21:04PM +, Joseph Myers wrote: > > > I think this is changing architecture-independent code in a way that is > > > not clearly safe based on the architect

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread H.J. Lu
On Tue, Feb 12, 2019 at 4:43 PM Joseph Myers wrote: > > On Wed, 13 Feb 2019, Jakub Jelinek wrote: > > > On Tue, Feb 12, 2019 at 11:21:04PM +, Joseph Myers wrote: > > > I think this is changing architecture-independent code in a way that is > > > not clearly safe based on the architecture-indep

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread Joseph Myers
On Wed, 13 Feb 2019, Jakub Jelinek wrote: > On Tue, Feb 12, 2019 at 11:21:04PM +, Joseph Myers wrote: > > I think this is changing architecture-independent code in a way that is > > not clearly safe based on the architecture-independent options design, in > > order to address an architecture

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread Jakub Jelinek
On Tue, Feb 12, 2019 at 11:21:04PM +, Joseph Myers wrote: > I think this is changing architecture-independent code in a way that is > not clearly safe based on the architecture-independent options design, in > order to address an architecture-specific problem. The exclusion of Actually, I

Re: PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread Joseph Myers
On Tue, 12 Feb 2019, H.J. Lu wrote: > > > Prune joined switches with negation to allow -march=skylake-avx512 to > > > override previous -march=native on command-line. > > > > > > PR driver/69471 > > > * opts-common.c (prune_options): Also prune joined switches > > > with ne

PING^1: [PATCH] driver: Also prune joined switches with negation

2019-02-12 Thread H.J. Lu
On Fri, Feb 8, 2019 at 3:09 PM H.J. Lu wrote: > > On Fri, Feb 8, 2019 at 3:02 PM H.J. Lu wrote: > > > > When -march=native is passed to host_detect_local_cpu to the backend, > > it overrides all command lines after it. That means > > > > $ gcc -march=native -march=skylake-avx512 > > > > is the t

Re: [PATCH] driver: Also prune joined switches with negation

2019-02-08 Thread H.J. Lu
* config/i386/i386.opt (march=): Add Negative(march=). > (mtune=): Add Negative(mtune=). Here is the updated patch. -- H.J. From a5a453e48f8560955cfa2e2db3b8f4f22b9cf9b1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 8 Feb 2019 14:52:57 -0800 Subject: [PATCH] driver:

[PATCH] driver: Also prune joined switches with negation

2019-02-08 Thread H.J. Lu
When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it. That means $ gcc -march=native -march=skylake-avx512 is the treated as $ gcc -march=skylake-avx512 -march=native Prune joined switches with negation to allow -march=skylake-avx512 to