public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Jason Merrill <jason@redhat.com>, <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH V2 0/4] Unify C and C++ handling of loops and switches
Date: Thu, 17 Sep 2020 20:14:50 -0600	[thread overview]
Message-ID: <30c6b423-db34-581e-983f-113a1c6507dd@codesourcery.com> (raw)
In-Reply-To: <a6382bd8-3cc9-53a5-5fd1-86af3a9e0b5b@redhat.com>

On 9/17/20 8:32 AM, Jason Merrill wrote:

> We discussed this in a team meeting the other day, and agreed that it's 
> probably simpler to switch back to gotos for C++ than fix up all the 
> optimizers.  And that there probably isn't much benefit to the 
> middle-end to retain the higher level representation longer.

When I looked into the history of the C++ change to use LOOP_EXPR, it 
seemed the primary motivation was to allow the constexpr evaluator to 
recognize loops and the optimization benefits were only lightly tested. 
But now the constexpr evaluator doesn't need LOOP_EXPR, and meanwhile I 
think the loop infrastructure and loop optimization test cases have been 
tuned for the C-style output.

> Though the patch needed to the Fortran compiler sounds like a regression 
> from this change.  Has someone looked at where that's coming from?

I tried, but wasn't able to come up with a self-contained test case 
small enough that I could actually analyze what it was doing, but that 
still triggered the warning.  In fact I am still unsure whether it is a 
bug that we weren't diagnosing that warning before, rather than that it 
showed up now.  :-S  As a programmer looking at that code, I thought the 
warning was justifiable, at least.

> Have you done any benchmark comparison for C++ tests with this change? 
> If not, please plan to monitor the lnt.opensuse.org benchmark results 
> for impact after the change is committed.

I haven't done any benchmarking myself, but yes, I will keep an eye on 
those benchmark results.

> The C++ changes are OK.  A C maintainer will need to sign off on the 
> changes there.

Thanks for the review!

-Sandra

  parent reply	other threads:[~2020-09-18  2:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 16:34 Sandra Loosemore
2020-08-13 16:34 ` [PATCH V2 1/4] Move loop and switch tree data structures from cp/ to c-family/ Sandra Loosemore
2020-08-13 16:34 ` [PATCH V2 2/4] Use C-style loop lowering instead of C++-style Sandra Loosemore
2020-08-13 16:34 ` [PATCH V2 3/4] Work around bootstrap failure in Fortran front end Sandra Loosemore
     [not found]   ` <7d3fbcd3-759b-10bc-d620-83de53e027fd@moene.org>
2020-08-15 18:24     ` Fwd: " Thomas Koenig
2020-08-13 16:34 ` [PATCH V2 4/4] Change C front end to emit structured loop and switch tree nodes Sandra Loosemore
2020-08-28 16:58 ` [PING] [PATCH V2 0/4] Unify C and C++ handling of loops and switches Sandra Loosemore
2020-09-09 17:38   ` [PING^2] " Sandra Loosemore
2020-09-09 21:13 ` Jason Merrill
2020-09-10  0:20   ` Sandra Loosemore
2020-09-17 14:32     ` Jason Merrill
2020-09-17 22:51       ` Joseph Myers
2020-09-17 22:57       ` Jeff Law
2020-09-18  2:14       ` Sandra Loosemore [this message]
2020-09-10 13:36   ` David Malcolm
2020-09-10 16:06     ` Sandra Loosemore

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=30c6b423-db34-581e-983f-113a1c6507dd@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.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).