public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Jakub Jelinek <jakub@redhat.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 10:36:29 -0500	[thread overview]
Message-ID: <f9049781-1946-ebd0-b151-c54448abc8ac@linux.ibm.com> (raw)
In-Reply-To: <ZEagNGPcXb+gy/5b@tucnak>

On 4/24/23 10:28 AM, Jakub Jelinek wrote:
> 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.

Ah, so it is an issue with compile time then.  If so, then sure, being -O2
and above makes sense then.  Thanks for pointing that out!

Peter



      reply	other threads:[~2023-04-24 15:40 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
2023-04-24 15:36       ` Peter Bergner [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=f9049781-1946-ebd0-b151-c54448abc8ac@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).