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: Mon, 14 Jun 2021 20:28:31 +0000	[thread overview]
Message-ID: <bug-101014-4-fPMu2kHXOD@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 #4 from Andrew Macleod <amacleod at redhat dot com> ---
When a range is being calculated for an ssa-name, the propagation process often
goes along back edges. These back edges sometime require other ssa-names which
have not be processed yet. These are flagged as "poor values" and when
propagation is done, we visit the list of poor values, calculate them, and see
if that may result if a better range for the original ssa-name. 

The problem is that calculating these poor values may also spawn another set of
requests since the block at the far end of the back edge has not been processed
yet... its highly likely that some additional unprocessed ssa-names are used in
the calculation of that name, but typically they do not affect the current
range in a significant way. 

Thus we mostly we care about the first order effect only.  It turns out to be
very rare that a 2nd order effect on a back edge affects anything that we don't
catch later. 

This patch turns off poor-value tagging when looking up the first order values,
thus avoiding the 2nd order and beyond cascading effects.

I haven't found a test case we miss yet because of this change, yet it probably
resolves a number of the outstanding compilation problems in a significant way.

I think this will probably apply to gcc 11 in some form as well, so I'll look
at an equivalent patch for there.

  parent reply	other threads:[~2021-06-14 20:28 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 [this message]
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
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-fPMu2kHXOD@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).