public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb.gcc@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	Bernd Schmidt <bernds@codesourcery.com>,
		GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Combine four insns
Date: Tue, 10 Aug 2010 16:47:00 -0000	[thread overview]
Message-ID: <AANLkTi=MeRRfBBYcdkdfSrstfLRTH0_NLnujHRBQyz_x@mail.gmail.com> (raw)
In-Reply-To: <8739um8mz5.fsf@basil.nowhere.org>

On Tue, Aug 10, 2010 at 6:13 PM, Andi Kleen <andi@firstfloor.org> wrote:
> Steven Bosscher <stevenb.gcc@gmail.com> writes:
>
>> On Tue, Aug 10, 2010 at 4:39 PM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> You could enable the heuristic with optimize < 3 && !optimize_size
>>> (thus keep combining everything at -O3 and -Os).
>>
>> Better s/optimize_size/optimize_bb_for_size(BLOCK_FOR_INSN (i0))/
>
> That would mean that a -O2 build where all BBs are cold for some
> reason would be 1% slower, right?

It's not 1% anymore with the heuristic to only do leaves with 4 insns.
Before that (from Bernd's numbers):

$ grep Trying.four log |wc -l
307743

and after:

$ grep Trying.four log2 |wc -l
187120

So only ~60% of the attempts and probably also less time simplifying.
Slowdown should be less than 0.5% after that.


> To be honest I didn't fully understand why it's ok for -Os
> to be 1% slower. A lot of people use -Os.

Yes, and they expect the smallest code possible. This patch does seem
to help for that.

Ciao!
Steven

  reply	other threads:[~2010-08-10 16:38 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 [this message]
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
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='AANLkTi=MeRRfBBYcdkdfSrstfLRTH0_NLnujHRBQyz_x@mail.gmail.com' \
    --to=stevenb.gcc@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).