public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Ajit Agarwal <aagarwa1@linux.ibm.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Peter Bergner <bergner@linux.ibm.com>,
	Jeff Law <jeffreyalaw@gmail.com>,
	Richard Biener <richard.guenther@gmail.com>,
	Raphael Zinsly <rzinsly@ventanamicro.com>
Subject: Re: [PATCH] ree: Improvement of ree pass for rs6000 target.
Date: Tue, 4 Apr 2023 10:40:29 -0500	[thread overview]
Message-ID: <20230404154029.GE25951@gate.crashing.org> (raw)
In-Reply-To: <ZCxBoqH9BqHTaVaj@tucnak>

On Tue, Apr 04, 2023 at 05:26:26PM +0200, Jakub Jelinek wrote:
> On Tue, Apr 04, 2023 at 10:19:23AM -0500, Segher Boessenkool wrote:
> > > > +    /* Enable -free for zero extension and sign extension elimination.*/
> > > > +    { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
> > > 
> > > I believe the options should be sorted by the OPT_LEVEL* they are given.
> > 
> > If that is true, that rule is violated all over the place already.  It
> > doesn't make much sense anyway, the OPT_LEVEL* have no complete ordering
> > at all.  But, yeah, -O2 stuff after the -O1 stuff makes sense, and we do
> > have such a partial ordering now.
> 
> At least default_options_table sorts stuff like that.  Sure, the larger
> the table it is, the more it is important to be able to see clearly what
> each level enables.

And ours is 16 lines including whitespace.  But yeah, and the
presentation can be improved other ways as well.

The default_options_table has in order:
    /* -O1 and -Og optimizations.  */
    /* -O1 (and not -Og) optimizations.  */
    /* -O2 and -Os optimizations.  */
    /* -O2 and above optimizations, but not -Os or -Og.  */
    /* -O3 and -Os optimizations.  */
    /* -O3 optimizations.  */
    /* -O3 parameters.  */
    /* -Ofast adds optimizations to -O3.  */
(and no OPT_LEVELS_ALL at all, the most common for us and probably
most other targets.  Logically these come first, if ordering by opt
level).

Either way, yes we should have some grouping.  Not the same as the
above, but something that does make some sense :-)


Segher

      reply	other threads:[~2023-04-04 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 11:32 Ajit Agarwal
2023-04-04 11:53 ` Jakub Jelinek
2023-04-04 15:19   ` Segher Boessenkool
2023-04-04 15:26     ` Jakub Jelinek
2023-04-04 15:40       ` Segher Boessenkool [this message]

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=20230404154029.GE25951@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=aagarwa1@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=rzinsly@ventanamicro.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).