public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at kam dot mff.cuni.cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/102997] [12 Regression] 45% 454.calculix regression with LTO+PGO -march=native -Ofast on Zen since r12-4526-gd8edfadfc7a9795b65177a50ce44fd348858e844
Date: Mon, 08 Nov 2021 11:44:57 +0000	[thread overview]
Message-ID: <bug-102997-4-Sd96z7KkjC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102997-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #21 from hubicka at kam dot mff.cuni.cz ---
> to also allow to thread through a loop path not crossing the latch but
> at least for the issue of "breaking loops" the loops_crossed stuff shouldn't
> be necessary.  It might still prevent us from doing such transforms when
> it involves peeling.

I am not sure what is the set of tranforms we want to forbid in general.
I think main situation we want to prevent is turning single-entry loop
to irreducible loop by forwarding loop entry edges differently.

For that it should be safe to trhead if the path enters a loop and later
leaves. For that we need to keep track of loops we entered in stack and
pop them when we leave it and check that stack is empty at the end.  (or
do stackless bookeeping but it may happen that we start in one loop,
leave it and then enter different loop and stop in it which is stil
unsafe so just comparing loop nest of entry and exit block is not right
thing to do)

It seems to me that it should be also OK to thread if we thread all
entry edges to the loop (in particular if it is only one) which should
be easy to check by looking into other edges entering the path being
threaded and checking that they are from loop and not from outside
(since the outside edges will keep the old path alive and we end up with
duplicated entry point).

I may miss something obvious, but I would say that all other threads
involving loops should be fine and better informed than peeling since
threader knows that the path in question is special.

  parent reply	other threads:[~2021-11-08 11:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 10:05 [Bug middle-end/102997] New: 45% calculix regression with LTO+PGO -march=native -Ofast between ce4d1f632ff3f680550d3b186b60176022f41190 and 6fca1761a16c68740f875fc487b98b6bde8e9be7 on Zen hubicka at gcc dot gnu.org
2021-10-29 10:42 ` [Bug middle-end/102997] [12 Regression] 45% 454.calculix " rguenth at gcc dot gnu.org
2021-10-29 11:43   ` Jan Hubicka
2021-10-29 10:55 ` rguenth at gcc dot gnu.org
2021-10-29 11:00 ` rguenth at gcc dot gnu.org
2021-10-29 11:38 ` hubicka at kam dot mff.cuni.cz
2021-10-29 11:43 ` hubicka at kam dot mff.cuni.cz
2021-11-01 10:10 ` marxin at gcc dot gnu.org
2021-11-01 10:18 ` marxin at gcc dot gnu.org
2021-11-01 12:42 ` [Bug middle-end/102997] [12 Regression] 45% 454.calculix regression with LTO+PGO -march=native -Ofast on Zen since r12-4526-gd8edfadfc7a9795b65177a50ce44fd348858e844 marxin at gcc dot gnu.org
2021-11-01 15:05 ` aldyh at gcc dot gnu.org
2021-11-01 16:33 ` hubicka at kam dot mff.cuni.cz
2021-11-08  7:40 ` aldyh at gcc dot gnu.org
2021-11-08  7:43 ` aldyh at gcc dot gnu.org
2021-11-08  8:06 ` aldyh at gcc dot gnu.org
2021-11-08  8:24 ` marxin at gcc dot gnu.org
2021-11-08  8:25 ` rguenther at suse dot de
2021-11-08  8:33   ` Jan Hubicka
2021-11-08  8:33 ` hubicka at kam dot mff.cuni.cz
2021-11-08  8:34 ` aldyh at gcc dot gnu.org
2021-11-08  8:40 ` aldyh at gcc dot gnu.org
2021-11-08  8:51 ` hubicka at kam dot mff.cuni.cz
2021-11-08  9:50 ` rguenth at gcc dot gnu.org
2021-11-08 11:44 ` hubicka at kam dot mff.cuni.cz [this message]
2021-11-08 13:00 ` rguenther at suse dot de
2021-11-08 13:16 ` hubicka at kam dot mff.cuni.cz
2021-11-08 14:05 ` rguenther at suse dot de
2021-11-08 14:10 ` rguenth at gcc dot gnu.org
2021-11-08 14:19 ` rguenth at gcc dot gnu.org
2021-11-08 15:34 ` aldyh at gcc dot gnu.org
2021-11-09  7:26 ` rguenther at suse dot de
2021-11-12 13:42 ` marxin at gcc dot gnu.org
2021-11-12 13:56 ` rguenth at gcc dot gnu.org
2021-11-12 16:05 ` hubicka at kam dot mff.cuni.cz

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-102997-4-Sd96z7KkjC@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).