public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	Ajit Agarwal <aagarwa1@linux.ibm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	jeff Law <jeffreyalaw@gmail.com>,
	jakub Jelinek <jakub@redhat.com>,
	Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH v3 1/4] ree: Default ree pass for O2 and above for rs6000 target.
Date: Mon, 24 Apr 2023 10:23:06 -0500	[thread overview]
Message-ID: <809ed95b-686c-e515-584b-a1a1d40e6f68@linux.ibm.com> (raw)
In-Reply-To: <20230419200011.GG19790@gate.crashing.org>

On 4/19/23 3:00 PM, Segher Boessenkool wrote:
> On Wed, Apr 19, 2023 at 11:23:07PM +0530, Ajit Agarwal wrote:
>> 	* common/config/rs6000/rs6000-common.cc: Add REE pass as a
>> 	default rs6000 target pass for O2 and above.
> 
> Why only for -O2?  Only when optimising at all makes sense, people use
> -O0 only when they want to skip as many optimisations as possible, maybe
> because of compilation time concerns, maybe to avoid an ICE or other
> bug.  Isn't REE *always* a good thing, it never degrades code quality?
> Or are there situations where it results in worse code?

I think this is a case of following what the other architectures are doing.
Namely, x86, aarch64, riscv, sparc, alpha and h8300 all enable -free at
-O2 and above, not -O1.  Not to say that is the best answer, but I think
that is why we did the same.  I agree I don't think -free can produce
worse code which makes using it with -O1 and above an option.  Maybe someone
was worried about compile time???  Doesn't seem like an optimization like
this would be too expensive though.

Ajit, one thing that is missing from this specific patch is a change to
gcc/doc/invoke.texi mentioning Power to the list of architectures that
are enabling -free with the -O* options, which currently only mentions
Alpha, AArch64 and x86.  Being good community participants, it'd be
good to add the missing riscv, sparc and h8300 when adding Power.

Peter


  parent reply	other threads:[~2023-04-24 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 17:53 Ajit Agarwal
2023-04-19 20:00 ` Segher Boessenkool
2023-04-22 13:37   ` Ajit Agarwal
2023-04-24 15:23   ` Peter Bergner [this message]
2023-04-24 15:28     ` Jakub Jelinek
2023-04-24 15:36       ` Peter Bergner

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=809ed95b-686c-e515-584b-a1a1d40e6f68@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=aagarwa1@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=segher@kernel.crashing.org \
    /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).