public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109491] [11/12 Regression] Segfault in tree-ssa-sccvn.cc:expressions_equal_p()
Date: Fri, 14 Apr 2023 12:45:05 +0000	[thread overview]
Message-ID: <bug-109491-4-UaQGeJOEBS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109491-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109491

--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 14 Apr 2023, chip.kerchner at ibm dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109491
> 
> --- Comment #14 from Chip Kerchner <chip.kerchner at ibm dot com> ---
> Just one more question and then I'll switch to the new bug.
> 
> Would it help any if the functions that are "always_inline" be changed from
> non-static to static?
> 
> Eigen's approach (where this code originally came from - yes, it could be
> definite be better) is to use non-static inlined function.

I don't think so, you'd have to try.  The compile-time issues usually
show up when you have a multi-level call chain all being always-inline
as we then repeatedly early-optimize the same code over and over.
Usually we do that so functions become smaller for the inline heuristics
but for always-inlines that wouldn't matter (but of course making the
body smaller if there's more than one caller can still pay off).

It really depends on the actual callgraph and code which is also
why it is hard to improve.

Another probably more common with C++ code issue would be that we
inline into not optimized callers which means calls that are
almost trivially unreachable have not been eliminated yet but
get inlined.  Usual heuristics would only inline small functions
at this level and defer inlining of larger functions to IPA time
at which point the calls might be eliminated already.  Likewise
calls attributed const or pure might be subject to CSE but
always-inline forces them to be inlined before CSE.

So what you could try is instead of always_inline use
__attribute__((flatten)) on the functions containing the
loop kernels for example and then disable early inlining
(otherwise flatten is applied there as well) with -fno-early-inlining.

  parent reply	other threads:[~2023-04-14 12:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 20:25 [Bug tree-optimization/109491] New: " pthaugen at gcc dot gnu.org
2023-04-12 20:26 ` [Bug tree-optimization/109491] [13 Regression] " pinskia at gcc dot gnu.org
2023-04-12 20:46 ` pthaugen at gcc dot gnu.org
2023-04-12 20:52 ` pinskia at gcc dot gnu.org
2023-04-12 20:54 ` pinskia at gcc dot gnu.org
2023-04-12 21:08 ` bergner at gcc dot gnu.org
2023-04-12 21:16 ` pthaugen at gcc dot gnu.org
2023-04-13 11:34 ` rguenth at gcc dot gnu.org
2023-04-13 11:35 ` rguenth at gcc dot gnu.org
2023-04-13 12:07 ` rguenth at gcc dot gnu.org
2023-04-13 12:17 ` rguenth at gcc dot gnu.org
2023-04-13 13:00 ` cvs-commit at gcc dot gnu.org
2023-04-13 13:01 ` [Bug tree-optimization/109491] [11/12 " rguenth at gcc dot gnu.org
2023-04-13 16:22 ` chip.kerchner at ibm dot com
2023-04-14  7:17 ` rguenth at gcc dot gnu.org
2023-04-14 12:24 ` chip.kerchner at ibm dot com
2023-04-14 12:45 ` rguenther at suse dot de [this message]
2023-04-14 13:15 ` rguenth at gcc dot gnu.org
2023-04-14 13:32 ` hubicka at gcc dot gnu.org
2023-04-17  9:14 ` cvs-commit at gcc dot gnu.org
2023-04-17 10:44 ` [Bug tree-optimization/109491] [11 " cvs-commit at gcc dot gnu.org
2023-04-17 10:46 ` rguenth at gcc dot gnu.org

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=bug-109491-4-UaQGeJOEBS@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).