public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18704] New: Inlining limits cause 340% performance regression
@ 2004-11-28 18:16 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
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2004-11-28 18:16 UTC (permalink / raw)
  To: gcc-bugs

Compared to 3.4, the default inlining limits in 4.0 cause a 340%
performance regression on the tramp3d-v3.cpp testcase here:
http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/tramp3d-v3.cpp.gz

The regression can be attributed to the inlining limits, as
patching both compilers with the leafify patch results in same
performance.

Compilation options used are -Dleafify=fooblah -O2 -fpeel-loops -ffast-math
-march=pentium4 -mfpmath=sse -fno-exceptions.  Binary size is
"improved" by about 9% with the current defaults.

Using --param max-inline-insns-single=1000 worsens the situation to
a

Playing with the inlining params gives

max-inline-insns-single  large-function-growth  inline-unit-growth  regression
                                                                      340%
   1000                                                               375%
                               500                                    348%
                                                      200             -36% (1%
size regression)
                                                      175             -35% (4%
size improvement)
                                                      165             -12%
                                                      150             -12% (!?)
                                                      100             232%

So I guess, limiting overall unit growth is bad - can we disable limiting at
-Os, or provide a higher default value?  The "correct" value will be different
depending on the application.  Also, the documented default value for
inline-unit-growth is not what it actually seems to be (it is 50 reading
params.def, large-function-growth is also not correctly documented).

If we make the documented values the default, we get a 68% compile time
and a 3.7% code size regression for a 71% performance improvement (this was
including "correcting" the large-function-growth limit, which seems to hurt
rather than help).

-- 
           Summary: Inlining limits cause 340% performance regression
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-12-07 17:50 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-28 18:16 [Bug tree-optimization/18704] New: Inlining limits cause 340% performance regression 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
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

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).