public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Peter Bergner <bergner@linux.ibm.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Ajit Agarwal <aagarwa1@linux.ibm.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	jeff Law <jeffreyalaw@gmail.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 17:28:52 +0200	[thread overview]
Message-ID: <ZEagNGPcXb+gy/5b@tucnak> (raw)
In-Reply-To: <809ed95b-686c-e515-584b-a1a1d40e6f68@linux.ibm.com>

On Mon, Apr 24, 2023 at 10:23:06AM -0500, Peter Bergner wrote:
> 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.

I thought that
  df_chain_add_problem (DF_UD_CHAIN + DF_DU_CHAIN);
is quite expensive (only other pass which does that is SMS pass) and
  df_mir_add_problem ();
as well (REE pass being the only user of that).  As -O1 is meant to scale
well on huge compiler generated functions, perhaps REE isn't appropriate
for those by default.

	Jakub


  reply	other threads:[~2023-04-24 15:29 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
2023-04-24 15:28     ` Jakub Jelinek [this message]
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=ZEagNGPcXb+gy/5b@tucnak \
    --to=jakub@redhat.com \
    --cc=aagarwa1@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).