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/102943] [12 Regression] Jump threader compile-time hog with 521.wrf_r
Date: Wed, 16 Mar 2022 19:48:21 +0000	[thread overview]
Message-ID: <bug-102943-4-kcAejaD3LE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102943-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #47 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 52637
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52637&action=edit
new patch

I am working on a alternative cache for GCC 13, but along the way, I have
changes to the ranger_cache::range_from_dom() routine.  The original version
gave up when it hit a block which had outgoing edges. The new version is
smarter and basically goes back until it finds a cache entry, and then
intersects all outgoing edge between the two places. It also removes the
recursion , and does not SET any cache values during the lookup (making it a
true query).

The net effect of this is significant improvements in cache performance because
its used far less, but there is more time spend doing calculations. This
bootstraps and passes all regression tests.  we do miss out on a few minor
opportunities (30 out of 4400 in all of EVRP over the GCC source)  which occur
as a result of updated values not being propagated properly as the cache is no
longer "full" like it was before.  

IN GCC 13 I will address this, but I thought you might be interested in trying
this patch against this PR.

In building 380 GCC source files, I see the following avg speedups
evrp : -22.57%
VRP2 : -5.4%
thread_jumps_full : -14.16%
total : -0.44%

So it is not insignificant.

It is likely to be most effective in large CFGs.
This is *total* compile time percent speed up for the 5 most significant cases:

expr.ii  -2.62%
lra-constraints.ii -3.75%
caller-save.ii -3.98%
reload.ii -4.04%
optabs.ii -5.05%

EVRP isolated speedups (yes, these are *percetage* speedup)
expr.ii -62.38
simplify-rtx.ii  -65.97
lra-constraints.ii  -67.87
reload.ii trunk  -68.67
caller-save.ii trunk  -71.93
optabs.ii trunk  -78.69

I think those times are probably worth the odd miss.

Anyway, next time you are checking performance for this PR maybe also try this
patch and see how it performs.

  parent reply	other threads:[~2022-03-16 19:48 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 11:13 [Bug tree-optimization/102943] New: VRP " rguenth at gcc dot gnu.org
2021-10-26 11:15 ` [Bug tree-optimization/102943] [12 Regression] " rguenth at gcc dot gnu.org
2021-10-26 11:25 ` rguenth at gcc dot gnu.org
2021-10-26 11:49 ` rguenth at gcc dot gnu.org
2021-10-26 14:57 ` pinskia at gcc dot gnu.org
2021-10-26 14:58 ` marxin at gcc dot gnu.org
2021-10-26 15:06 ` marxin at gcc dot gnu.org
2021-10-30  6:31 ` aldyh at gcc dot gnu.org
2021-10-31 20:06 ` hubicka at gcc dot gnu.org
2021-11-02  7:25 ` [Bug tree-optimization/102943] [12 Regression] Jump " rguenth at gcc dot gnu.org
2021-11-02  7:29 ` aldyh at gcc dot gnu.org
2021-11-03 10:57 ` aldyh at gcc dot gnu.org
2021-11-03 10:58 ` aldyh at gcc dot gnu.org
2021-11-03 13:17 ` rguenther at suse dot de
2021-11-03 14:33 ` amacleod at redhat dot com
2021-11-03 14:42 ` rguenther at suse dot de
2021-11-04 14:40 ` cvs-commit at gcc dot gnu.org
2021-11-04 14:40 ` cvs-commit at gcc dot gnu.org
2021-11-04 14:40 ` cvs-commit at gcc dot gnu.org
2021-11-04 15:24 ` aldyh at gcc dot gnu.org
2021-11-04 17:00   ` Jan Hubicka
2021-11-04 17:00 ` hubicka at kam dot mff.cuni.cz
2021-11-05  9:08 ` aldyh at gcc dot gnu.org
2021-11-05 11:10 ` marxin at gcc dot gnu.org
2021-11-05 11:13 ` aldyh at gcc dot gnu.org
2021-11-05 11:23 ` marxin at gcc dot gnu.org
2021-11-05 17:16 ` cvs-commit at gcc dot gnu.org
2021-11-07 17:17 ` hubicka at gcc dot gnu.org
2021-11-07 18:16 ` aldyh at gcc dot gnu.org
2021-11-07 18:59   ` Jan Hubicka
2021-11-07 18:59 ` hubicka at kam dot mff.cuni.cz
2021-11-12 22:14 ` hubicka at gcc dot gnu.org
2021-11-14  9:58 ` hubicka at gcc dot gnu.org
2021-11-26 12:38 ` cvs-commit at gcc dot gnu.org
2021-11-30 10:55 ` aldyh at gcc dot gnu.org
2021-12-09 20:17 ` hubicka at gcc dot gnu.org
2022-01-03  8:47 ` rguenth at gcc dot gnu.org
2022-01-03 11:20 ` hubicka at kam dot mff.cuni.cz
2022-01-19  7:06 ` rguenth at gcc dot gnu.org
2022-03-10 11:37 ` rguenth at gcc dot gnu.org
2022-03-10 12:40 ` cvs-commit at gcc dot gnu.org
2022-03-10 13:22 ` rguenth at gcc dot gnu.org
2022-03-10 13:42 ` cvs-commit at gcc dot gnu.org
2022-03-10 13:45 ` rguenth at gcc dot gnu.org
2022-03-10 13:49 ` rguenth at gcc dot gnu.org
2022-03-10 14:01 ` amacleod at redhat dot com
2022-03-10 14:17 ` amacleod at redhat dot com
2022-03-10 14:23 ` rguenth at gcc dot gnu.org
2022-03-10 14:26 ` rguenth at gcc dot gnu.org
2022-03-10 14:33 ` amacleod at redhat dot com
2022-03-10 14:36 ` amacleod at redhat dot com
2022-03-16 19:48 ` amacleod at redhat dot com [this message]
2022-03-17 11:14 ` rguenth at gcc dot gnu.org
2022-03-17 13:05 ` amacleod at redhat dot com
2022-03-17 14:18 ` hubicka at kam dot mff.cuni.cz
2022-03-17 20:44 ` cvs-commit at gcc dot gnu.org
2022-03-23 10:40 ` 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-102943-4-kcAejaD3LE@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).