public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "Martin Liška" <mliska@suse.cz>,
	"GCC Patches" <gcc-patches@gcc.gnu.org>,
	"Michael Matz" <matz@suse.de>
Subject: Re: [PATCH] flag_complex_method: support optimize attribute
Date: Mon, 6 Sep 2021 14:16:58 +0200	[thread overview]
Message-ID: <CAFiYyc0wR-+xANJGsy2UM96S0LKbPA5exSYui5VX25m1k6=Npg@mail.gmail.com> (raw)
In-Reply-To: <20210906114613.GU920497@tucnak>

On Mon, Sep 6, 2021 at 1:46 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Mon, Sep 06, 2021 at 01:37:46PM +0200, Martin Liška wrote:
> > --- a/gcc/opts.c
> > +++ b/gcc/opts.c
> > @@ -1323,6 +1323,14 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
> >        = (opts->x_flag_unroll_loops
> >           || opts->x_flag_peel_loops
> >           || opts->x_optimize >= 3);
> > +
> > +  /* With -fcx-limited-range, we do cheap and quick complex arithmetic.  */
> > +  if (opts->x_flag_cx_limited_range)
> > +    flag_complex_method = 0;
> > +
> > +  /* With -fcx-fortran-rules, we do something in-between cheap and C99.  */
> > +  if (opts->x_flag_cx_fortran_rules)
> > +    flag_complex_method = 1;
>
> That should then be opts->x_flag_complex_method instead of flag_complex_method.
>
> Ok with that change.

But the C/C++ langhooks also set flag_complex_method so I fail to see how
this helps?  As said I was referring to -fcx-limited-range on the command-line
and -fno-cx-limited-range in the optimize node to undo this which should
get you the langhook setting of flag_complex_method = 2.

> Note, I think we want to do much more in finish_options and less in
> process_options, anything that is about Optimization options rather than
> just the global ones.  Though one needs to be careful with the cases where
> the code diagnoses something.
>
>         Jakub
>

  reply	other threads:[~2021-09-06 12:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 11:47 [PATCH] Optimize macro: make it more predictable Martin Liška
2020-11-03 13:27 ` Richard Biener
2020-11-03 13:34   ` Jakub Jelinek
2020-11-03 13:40     ` Richard Biener
2020-11-09 10:35     ` Martin Liška
2020-11-26 13:56       ` Martin Liška
2020-12-07 11:03         ` Martin Liška
2021-01-11 13:10           ` Martin Liška
2020-11-09 10:27   ` Martin Liška
2020-11-06 17:34 ` Jeff Law
2020-11-09 10:36   ` Martin Liška
2021-07-01 13:13 ` Martin Liška
2021-08-10 15:52   ` Martin Liška
2021-08-24 11:06     ` Martin Liška
2021-08-24 12:13   ` Richard Biener
2021-08-24 13:04     ` Martin Liška
2021-08-26 11:04       ` Richard Biener
2021-08-26 12:39         ` Martin Liška
2021-08-26 13:20           ` Richard Biener
2021-08-27  8:35           ` Martin Liška
2021-08-27  9:05             ` Richard Biener
2021-09-13 13:52               ` Martin Liška
2021-09-19  5:46                 ` Jeff Law
2021-09-06 11:37         ` [PATCH] flag_complex_method: support optimize attribute Martin Liška
2021-09-06 11:46           ` Jakub Jelinek
2021-09-06 12:16             ` Richard Biener [this message]
2021-09-06 12:24               ` Jakub Jelinek
2021-09-07  9:42               ` Martin Liška
2021-09-13 13:32                 ` Martin Liška
2021-09-19 14:45                 ` Jeff Law

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='CAFiYyc0wR-+xANJGsy2UM96S0LKbPA5exSYui5VX25m1k6=Npg@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=matz@suse.de \
    --cc=mliska@suse.cz \
    /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).