public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Bernd Schmidt <bernds@codesourcery.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>,
	gcc-patches@gcc.gnu.org, 	Mark Mitchell <mark@codesourcery.com>,
	Richard Guenther <richard.guenther@gmail.com>,
		David Daney <ddaney@caviumnetworks.com>,
	Andi Kleen <andi@firstfloor.org>,
		Steven Bosscher <stevenb.gcc@gmail.com>
Subject: Re: Combine four insns
Date: Fri, 20 Aug 2010 00:21:00 -0000	[thread overview]
Message-ID: <AANLkTimZN58V24J+hX5JADLNgv=VWp+QTd0thgwooKhv@mail.gmail.com> (raw)
In-Reply-To: <4C6D6BEC.1020700@codesourcery.com>

On Thu, Aug 19, 2010 at 10:37 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 08/19/2010 09:38 AM, Eric Botcazou wrote:
>>> Mark said the plan was sensible, so I think there is no tie.
>>
>> Sorry, this is such a bad decision in my opinion, as it will set a precedent
>> for one-percent-slowdown-for-very-little-benefit patches, that I think an
>> explicit OK is in order.
>
> We're no longer discussing the 1% slower patch.  I'll even agree that
> that's a bit excessive, and the approval for it surprised me, but it
> served to get a discussion going.  Several people provided datapoints
> indicating that time spent in the optimizers at -O2 or higher is
> something that just isn't on the radar as a valid concern based both on
> usage patterns and profiling results which show that most time is spent
> elsewhere.
>
> As for the patch itself, Michael Matz provided constructive feedback
> which led to a heuristic that eliminated a large number of combine-4
> attempts.  I conclude that either you didn't read the thread before
> attempting once again to block one of my patches, or the above is more
> than a little disingenuous.
>
> The following is a slightly updated variant of the previous patch I
> posted.  I fixed a bug and slightly cleaned up the in_feeds_im logic
> (insn_a_feeds_b isn't valid for insns that aren't consecutive in the
> combination), and I found a way to slightly relax the heuristic in order
> to use Michael's suggestion of allowing combinations if there are two or
> more binary operations with constant operand.
>
> On i686, the heuristic reduces the combine-4 attempts to slightly over a
> third of the ones tried by the first patch (and presumably disallows
> them in most cases where we'd generate overly large RTL).  Hence, I
> would have expected this patch to cause slowdowns in the 0.4% range, but
> when I ran a few bootstraps today, I had a few results near 99m5s user
> time with the patch, and the best run without the patch came in at
> 99m10s.  I don't have enough data to be sure, but some test runs gave me
> the impression that there is one change, using insn_a_feeds_b instead of
> reg_overlap_mentioned_p, which provided some speedup, and may explain
> this result.  It still seems a little odd.
>
> Allowing unary ops in the heuristic as well made hardly a difference in
> output, and appeared to cost around 0.3%, so I left it out.
>
> Bootstrapped and regression tested on i686-linux.  Committed.
>

This may have caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45350


-- 
H.J.

  parent reply	other threads:[~2010-08-19 22:53 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 14:49 Bernd Schmidt
2010-08-06 15:04 ` Richard Guenther
2010-08-06 20:08   ` Bernd Schmidt
2010-08-06 20:37     ` Richard Guenther
2010-08-06 21:53       ` Jeff Law
2010-08-06 22:41       ` Bernd Schmidt
2010-08-06 23:47         ` Richard Guenther
2010-08-07  8:11           ` Eric Botcazou
2010-08-09 12:29             ` Bernd Schmidt
2010-08-09 12:39               ` Steven Bosscher
2010-08-09 13:48                 ` Bernd Schmidt
2010-08-10  2:51                 ` Laurynas Biveinis
2010-08-09 12:41               ` Michael Matz
2010-08-09 14:34                 ` Bernd Schmidt
2010-08-09 14:39               ` Toon Moene
2010-08-09 14:50                 ` Steven Bosscher
2010-08-09 14:58                   ` The speed of the compiler, was: " Toon Moene
2010-08-09 15:00                     ` Paul Koning
2010-08-09 15:33                     ` Diego Novillo
2010-08-09 15:53                       ` Mark Mitchell
2010-08-09 17:15                       ` Toon Moene
2010-08-09 17:19                         ` Diego Novillo
2010-08-09 17:29                           ` Toon Moene
2010-08-09 23:24                             ` Chris Lattner
2010-08-10 13:02                               ` Toon Moene
2010-08-10 15:36                                 ` Chris Lattner
2010-08-10 14:58                               ` Andi Kleen
2010-08-10 15:03                                 ` Richard Guenther
2010-08-10 15:32                                   ` Andi Kleen
2010-08-10 20:09                                     ` Tom Tromey
2010-08-10 20:23                                       ` Andi Kleen
2010-08-10 22:40                                         ` Mike Stump
2010-08-10 23:16                                         ` Tom Tromey
2010-08-12 21:09                                       ` Nathan Froyd
2010-08-17 15:14                                       ` Mark Mitchell
2010-08-10 20:15                                 ` H.J. Lu
2010-08-12 21:38                                 ` Vectorized _cpp_clean_line Richard Henderson
2010-08-12 22:18                                   ` Andi Kleen
2010-08-12 22:32                                     ` Richard Henderson
2010-08-12 23:10                                       ` Richard Henderson
2010-08-12 23:13                                         ` Richard Henderson
2010-08-13  8:33                                         ` Andi Kleen
2010-08-13  7:26                                       ` Andi Kleen
2010-08-14 17:14                                         ` [CFT, v4] " Richard Henderson
2010-08-17 16:59                                           ` Steve Ellcey
2010-08-17 17:21                                             ` Richard Henderson
2010-08-17 20:32                                               ` Steve Ellcey
2010-08-18 17:14                                                 ` Steve Ellcey
2010-08-17 17:32                                             ` Jakub Jelinek
2010-08-18  3:23                                           ` Tom Tromey
     [not found]                                           ` <1281998097.3725.3.camel@gargoyle>
     [not found]                                             ` <4C69C317.2080207@redhat.com>
     [not found]                                               ` <1282142212.3725.6.camel@gargoyle>
     [not found]                                                 ` <4C6BF5F7.7040100@redhat.com>
     [not found]                                                   ` <1282149264.3725.15.camel@gargoyle>
     [not found]                                                     ` <4C6C0D92.7080100@redhat.com>
     [not found]                                                       ` <1282151361.3725.19.camel@gargoyle>
     [not found]                                                         ` <4C6C166A.90306@redhat.com>
     [not found]                                                           ` <1282152938.3725.27.camel@gargoyle>
     [not found]                                                             ` <4C6C39DB.8070409@redhat.com>
2010-08-18 21:50                                                               ` Richard Henderson
2010-08-19 14:12                                                                 ` Luis Machado
2010-08-09 17:27                       ` The speed of the compiler, was: Re: Combine four insns Joseph S. Myers
2010-08-09 18:23                         ` Diego Novillo
2010-08-10  6:20                         ` Chiheng Xu
2010-08-10  7:22                           ` Chiheng Xu
2010-08-09 17:34                       ` Steven Bosscher
2010-08-09 17:36                         ` Diego Novillo
2010-08-09 23:13                           ` Cary Coutant
2010-08-09 18:59                       ` The speed of the compiler Ralf Wildenhues
2010-08-09 19:04                         ` Diego Novillo
2010-08-09 21:12                       ` The speed of the compiler, was: Re: Combine four insns Mike Stump
2010-08-09 23:48                         ` Cary Coutant
2010-08-10 14:37       ` Bernd Schmidt
2010-08-10 14:40         ` Richard Guenther
2010-08-10 14:49           ` Bernd Schmidt
2010-08-10 15:06             ` Steven Bosscher
2010-08-10 15:06           ` Steven Bosscher
2010-08-10 16:27             ` Andi Kleen
2010-08-10 16:47               ` Steven Bosscher
2010-08-10 16:55                 ` Andi Kleen
2010-08-10 17:03                   ` David Daney
2010-08-11  8:53                     ` Richard Guenther
2010-08-16 20:42                       ` Mark Mitchell
2010-08-16 20:45                         ` Bernd Schmidt
2010-08-16 21:03                           ` Mark Mitchell
2010-08-18 20:50                           ` Eric Botcazou
2010-08-18 22:03                             ` Bernd Schmidt
2010-08-19  8:04                               ` Eric Botcazou
2010-08-19 15:44                                 ` Mark Mitchell
2010-08-19 18:13                                 ` Bernd Schmidt
2010-08-19 18:25                                   ` Mark Mitchell
2010-08-19 18:42                                   ` Richard Henderson
2010-08-19 22:14                                   ` Eric Botcazou
2010-08-19 22:19                                     ` Bernd Schmidt
2010-08-19 22:21                                       ` Eric Botcazou
2010-08-19 22:37                                         ` Bernd Schmidt
2010-08-19 22:53                                           ` Steven Bosscher
2010-08-19 23:34                                         ` Andrew Pinski
2010-08-19 23:40                                           ` Bernd Schmidt
2010-08-20  1:59                                             ` Mark Mitchell
2010-08-20  3:56                                               ` Diego Novillo
2010-08-20  4:13                                                 ` Mark Mitchell
2010-08-20 14:14                                               ` Eric Botcazou
2010-08-20 14:36                                                 ` Paolo Bonzini
2010-08-21 13:46                                                   ` Eric Botcazou
2010-08-23 17:03                                                     ` Richard Guenther
2010-08-23 17:08                                                       ` Mark Mitchell
2010-08-20 14:44                                                 ` Mark Mitchell
2010-08-20 10:21                                           ` Paolo Bonzini
2010-08-20  0:21                                   ` H.J. Lu [this message]
2010-08-20  0:36                                     ` Bernd Schmidt
2010-08-20 14:07                                     ` H.J. Lu
2010-08-11 12:32         ` Michael Matz
2010-08-06 15:08 ` Steven Bosscher
2010-08-06 16:45   ` Paolo Bonzini
2010-08-06 17:22     ` Steven Bosscher
2010-08-06 18:02       ` Jeff Law
2010-08-06 20:44         ` Steven Bosscher
2010-08-06 20:48           ` Richard Guenther
2010-08-06 21:49           ` Jeff Law
2010-08-06 18:56       ` Vladimir N. Makarov
2010-08-06 19:02         ` Steven Bosscher
2010-08-06 21:11         ` Chris Lattner
2010-08-08 11:40         ` Paolo Bonzini
2010-08-12  5:53         ` Ian Lance Taylor
2010-08-06 19:20   ` Bernd Schmidt
2010-08-06 19:37     ` Jeff Law
2010-08-06 19:43       ` Bernd Schmidt
2010-08-06 21:46         ` Jeff Law
2010-08-09 14:54           ` Mark Mitchell
2010-08-09 15:04             ` Bernd Schmidt
2010-08-09 16:02             ` Chris Lattner
2010-08-09 16:07               ` Richard Guenther
2010-08-09 17:28                 ` Joseph S. Myers
2010-08-09 16:19               ` Mark Mitchell
2010-08-09 17:02                 ` Chris Lattner
2010-08-10  2:50                   ` Mark Mitchell
2010-08-10 15:35                     ` Chris Lattner

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='AANLkTimZN58V24J+hX5JADLNgv=VWp+QTd0thgwooKhv@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=bernds@codesourcery.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=richard.guenther@gmail.com \
    --cc=stevenb.gcc@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).