public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101014] [12 Regression] Big compile time hog with -O3 since r12-1268-g9858cd1a6827ee7a
Date: Tue, 22 Jun 2021 13:55:26 +0000	[thread overview]
Message-ID: <bug-101014-4-nLGRCVMD8G@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101014-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 51050
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51050&action=edit
patch to fix the issue

The gift that keeps on giving eh.
OK, this should solve the infinite loop. Give it a try, I'm running it through
testing now.

When I introduced the sparse on-entry cache, it is limited to 15 unique ranges
for any given ssa-name, then  it reverts to varying for any additional values
to be safe.

The cache propagation engine works by combining incoming ranges and if that is
different than that current on-entry range, stores that  and proceeds to push
this new value on outgoing edges.

What was happening here is this new value that was calculated was beyond the 15
allowed. When it was stored, it was stored as VARYING.  This block was in a
cycle feeding back to itself, so when it calculated the on-enty value again and
compared, it though it needed to update again.  Which of course failed again...
and the endless loop of trying to propagate was born.

This patch checks that the value being stored to the cache is the same as the
value when it is immediately reloaded. If that fails, we stop trying to
propagate that value.

Please check that it solves both this problam, and likely the 101148 problem

  parent reply	other threads:[~2021-06-22 13:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 10:58 [Bug tree-optimization/101014] New: " marxin at gcc dot gnu.org
2021-06-10 11:01 ` [Bug tree-optimization/101014] " marxin at gcc dot gnu.org
2021-06-10 11:13 ` marxin at gcc dot gnu.org
2021-06-10 12:23 ` marxin at gcc dot gnu.org
2021-06-10 13:42 ` amacleod at redhat dot com
2021-06-14 20:28 ` amacleod at redhat dot com
2021-06-15  6:49 ` marxin at gcc dot gnu.org
2021-06-15 13:01 ` amacleod at redhat dot com
2021-06-16  8:38 ` marxin at gcc dot gnu.org
2021-06-16  8:38 ` marxin at gcc dot gnu.org
2021-06-18 21:44 ` cvs-commit at gcc dot gnu.org
2021-06-18 21:46 ` amacleod at redhat dot com
2021-06-21  8:48 ` crazylht at gmail dot com
2021-06-21  9:09 ` aldyh at gcc dot gnu.org
2021-06-21  9:59 ` crazylht at gmail dot com
2021-06-21 10:37 ` rguenth at gcc dot gnu.org
2021-06-22  5:07 ` marxin at gcc dot gnu.org
2021-06-22  5:08 ` marxin at gcc dot gnu.org
2021-06-22 13:55 ` amacleod at redhat dot com [this message]
2021-06-22 15:08 ` marxin at gcc dot gnu.org
2021-06-23 14:26 ` cvs-commit at gcc dot gnu.org
2021-06-23 14:31 ` amacleod at redhat dot com
2021-07-14 21:58 ` cvs-commit 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-101014-4-nLGRCVMD8G@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).