public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	krebbel@linux.ibm.com,        rdapp@linux.ibm.com,
	richard.guenther@gmail.com
Subject: Re: [PATCH v3] combine: perform jump threading at the end
Date: Tue, 18 Sep 2018 14:56:00 -0000	[thread overview]
Message-ID: <20180918143016.GR23155@gate.crashing.org> (raw)
In-Reply-To: <76A5F8BB-1329-457E-85FF-5A6DBA70FDB6@linux.ibm.com>

On Tue, Sep 18, 2018 at 01:29:56PM +0200, Ilya Leoshkevich wrote:
> > Yeah, jump2 is quite late.  I think you should do it before postreload_cse
> > or similar.
> 
> Thanks, I will give it a try.
> 
> > Btw, what percentage of files (or subroutines) does jump threading run
> > after combine, with your patch?
> 
> I checked this on SPEC CPU 2006.
> 
> Turns out it’s not as good as I expected: the additional jump threading
> is performed on 64% of the functions.  I think this is because I only
> check whether PATTERNs have any side-effects, but I don’t look at
> INSN_CODEs.  I'll try to change this and see whether I'll get a better
> number.
> 
> Here are some other figures:
> 
> - The total number of cleanup_cfg calls: +3.3%.
> - The total run time of cleanup_cfg:     +5.5%.
> - The average run time of cleanup_cfg:   +2.1%.

Thanks for all those numbers!

So IMO it is not worth doing this only _some_ of the time after combine,
given it doesn't help much and requires awful code, and awful code
duplication (setting state no less, eww).

It is also clear that jump threading indeed is quite a bit more expensive
than the average cleanup_cfg.

But it is also clear that in the grand scheme of things doing it always
does not cost much.

I wonder if it also helps on other targets to do an extra jump threading
(say right before postreload_cse)?  That would pretty much seal the deal
I'd say.


Segher

      reply	other threads:[~2018-09-18 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 10:59 Ilya Leoshkevich
2018-09-14 21:37 ` Segher Boessenkool
2018-09-17  8:54   ` Ilya Leoshkevich
2018-09-17 17:24     ` Segher Boessenkool
2018-09-18 10:27       ` Ilya Leoshkevich
2018-09-18 14:31         ` Segher Boessenkool
2018-09-18 11:44       ` Ilya Leoshkevich
2018-09-18 14:56         ` Segher Boessenkool [this message]

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=20180918143016.GR23155@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iii@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    --cc=rdapp@linux.ibm.com \
    --cc=richard.guenther@gmail.com \
    /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).