public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/18704] [4.0 Regression] Inlining limits cause 340% performance regression
Date: Mon, 06 Dec 2004 13:40:00 -0000	[thread overview]
Message-ID: <20041206134040.24619.qmail@sourceware.org> (raw)
In-Reply-To: <20041128181553.18704.rguenth@tat.physik.uni-tuebingen.de>


------- Additional Comments From hubicka at ucw dot cz  2004-12-06 13:40 -------
Subject: Re:  [4.0 Regression] Inlining limits cause 340% performance regression

> 
> ------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de  2004-12-06 13:18 -------
> Subject: Re:  [4.0 Regression] Inlining limits
>  cause 340% performance regression
> 
> On 6 Dec 2004, hubicka at ucw dot cz wrote:
> 
> > The cfg inliner per se is not too interesting.  What matters here is the
> > code size esitmation and profitability estimation.  I am playing with
> > this now and trying to get profile based inlining working.
> 
> Yes, I guess the cfg inliner and some early dead code removal passes
> should improve code size metrics for stuff like
> 
> template <class X>
> struct Foo
> {
>   enum { val = X::val };
>   void foo()
>   {
>     if (val)
>       ...
>     else
>       ...
>   }
> };
> 
> with val being const.
> 
> > For -n10 and tramp3d.cc I need 2m14s on mainline, 1m31s on the current
> > tree-profiling.  With my new implementation I need 0m27s with profile
> > feedback and 2m53s without.  I wonder what makes the new heuristics work
> > worse without profiling, but just increasing the inline-unit-growth very
> > slightly (to 155) I get 0m42s.  This might be just little unstability in
> 
> Note that inline-unit-growth is 50 by default, so 155 is not slightly
> increased.
OK, I will play around with 55 then :)
> 
> > the order of inlining decisions affecting this.  I would be curious how
> > those results compare to leafify and whether the 0m27s is not caused by
> > missoptimization.
> 
> You can check for misoptimization by looking at the final output.
> I.e. the rh,vx,vy and vz sums should be nearly zero, the T sum
> will increase with the number of iterations.
> 
> With mainline, -O2 -fpeel-loops -march=pentium4 -ffast-math
> -D__NO_MATH_INLINES (we still need explicit -fpeel-loops for
> unrolling for (i=0;i<3;++i) a[i]=0;), I need 0m17s for -n 10 with
> leafification turned on, with it turned off, runtime increases
> to 0m31s with --param inline-unit-growth=175.

I compiled with -O3, would be possible for you to measure how much
speedup you get on mainline with -O3 and -O3+lefify?  That would
probably allow me relate those numbers somehow.
> 
> > Unless I will observe it otherwise (on SPEC with intermodule), I will
> > apply my current patch and try to improve the profitability analysis
> > without profiling incrementally.  Ideally we ought to build estimated
> > profile and use it, but that needs some work so for the moment I guess I
> > will try to experiment with making loop depth available to the cgraph
> > code.
> 
> Yes, loops could be "auto-leafified", but it will be difficult to
> statically check if that is worthwhile.

I guess just increasing priority for calls inside loops (something like
dividing current cost estimation by loop nest) would do good job for
now, but first I need to convince myself that the new rewrite does
resonable job even for current cost metric before moving on.

Honza
> 
> Richard.
> 
> --
> Richard Guenther <richard dot guenther at uni-tuebingen dot de>
> WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
> 
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18704
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


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


  parent reply	other threads:[~2004-12-06 13:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28 18:16 [Bug tree-optimization/18704] New: " rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-28 18:20 ` [Bug tree-optimization/18704] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-28 18:22 ` pinskia at gcc dot gnu dot org
2004-11-29 11:05 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-29 11:36 ` giovannibajo at libero dot it
2004-11-29 12:10 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-11-29 14:07 ` hubicka at ucw dot cz
2004-12-06  5:20 ` pinskia at gcc dot gnu dot org
2004-12-06  9:53 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-06 12:33 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-06 12:45 ` hubicka at ucw dot cz
2004-12-06 13:18 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-06 13:40 ` hubicka at ucw dot cz [this message]
2004-12-06 14:31 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-06 15:03 ` hubicka at ucw dot cz
2004-12-07 14:35 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-07 14:50 ` hubicka at ucw dot cz
2004-12-07 14:52 ` hubicka at ucw dot cz
2004-12-07 15:09 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-07 15:36 ` rguenth at tat dot physik dot uni-tuebingen dot de
2004-12-07 17:50 ` hubicka at ucw dot cz

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=20041206134040.24619.qmail@sourceware.org \
    --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).