public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* patch that caused part of the compile-time regression in PR opt/8361
@ 2003-01-31 10:56 Janis Johnson
  2003-01-31 11:07 ` Andreas Jaeger
  0 siblings, 1 reply; 2+ messages in thread
From: Janis Johnson @ 2003-01-31 10:56 UTC (permalink / raw)
  To: gcc, pfeifer, bangerth

I've been sick for a couple of weeks without much brainpower, but
enough to build compilers and run tests occasionally.  I'm trying to
track down changes that increased compile times for generate.ii from
PR 8361.  This particular test case occasionally causes ICEs and
sometimes gets compiler errors, so it's not a good candiate for a
binary search; also, I wanted to keep track of times for multiple
optimizations.  There are some other jumps later that I'll continue to
look into, but the first big one is caused by this patch:

2002-04-27  Kurt Garloff <garloff@suse.de>

        * tree-inline.c (inlinable_function_p): Improve heuristics
        by using a smoother function to cut down allowable inlinable size.
        * param.def: Add parameters max-inline-insns-single,
        max-inline-slope, min-inline-insns that determine the exact
        shape of the above function.
        * param.h: Likewise.

Times, in seconds of user time, on i686-pc-linux-gnu for compilers
built from mainline sources from the specified dates (UTC) using
GCC 3.2, CFLAGS="-g -O2", checking disabled:

                       -O0     -O2     -O3
2002-04-27 18:30        26      65      68
2002-04-27 19:00        26      72      80 
2002-05-27              26      71      78
2002-06-03              26      73      ICE
2002-06-17              30      76      ICE
2002-07-15              30      77      ICE
2002-08-12              error   error   error
2002-09-09              29      76      77
2002-10-07              error   error   error
2002-11-04                      81      82
2002-12-02                      81      82

Output of -ftime-report with -O3 before the patch:

Execution times (seconds)
 garbage collection    :   9.24 (13%) usr   0.03 ( 4%) sys   9.26 (13%) wall
 cfg construction      :   0.52 ( 1%) usr   0.02 ( 3%) sys   0.56 ( 1%) wall
 cfg cleanup           :   1.65 ( 2%) usr   0.00 ( 0%) sys   1.66 ( 2%) wall
 trivially dead code   :   1.51 ( 2%) usr   0.00 ( 0%) sys   1.54 ( 2%) wall
 life analysis         :   2.47 ( 4%) usr   0.02 ( 3%) sys   2.47 ( 4%) wall
 life info update      :   0.70 ( 1%) usr   0.00 ( 0%) sys   0.72 ( 1%) wall
 preprocessing         :   0.21 ( 0%) usr   0.03 ( 4%) sys   0.24 ( 0%) wall
 lexical analysis      :   0.55 ( 1%) usr   0.13 (18%) sys   0.67 ( 1%) wall
 parser                :   9.53 (14%) usr   0.24 (33%) sys   9.81 (14%) wall
 expand                :   9.01 (13%) usr   0.02 ( 3%) sys   9.11 (13%) wall
 varconst              :   0.40 ( 1%) usr   0.00 ( 0%) sys   0.39 ( 1%) wall
 integration           :   1.35 ( 2%) usr   0.01 ( 1%) sys   1.35 ( 2%) wall
 jump                  :   0.78 ( 1%) usr   0.01 ( 1%) sys   0.80 ( 1%) wall
 CSE                   :  11.52 (17%) usr   0.01 ( 1%) sys  11.48 (16%) wall
 global CSE            :   1.67 ( 2%) usr   0.00 ( 0%) sys   1.69 ( 2%) wall
 loop analysis         :   0.78 ( 1%) usr   0.01 ( 1%) sys   0.79 ( 1%) wall
 CSE 2                 :   3.93 ( 6%) usr   0.02 ( 3%) sys   3.98 ( 6%) wall
 branch prediction     :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall
 flow analysis         :   0.15 ( 0%) usr   0.00 ( 0%) sys   0.14 ( 0%) wall
 combiner              :   1.51 ( 2%) usr   0.00 ( 0%) sys   1.51 ( 2%) wall
 if-conversion         :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall
 regmove               :   0.43 ( 1%) usr   0.00 ( 0%) sys   0.44 ( 1%) wall
 mode switching        :   0.14 ( 0%) usr   0.00 ( 0%) sys   0.17 ( 0%) wall
 local alloc           :   1.08 ( 2%) usr   0.01 ( 1%) sys   1.07 ( 2%) wall
 global alloc          :   2.26 ( 3%) usr   0.02 ( 3%) sys   2.28 ( 3%) wall
 reload CSE regs       :   1.73 ( 3%) usr   0.00 ( 0%) sys   1.74 ( 2%) wall
 flow 2                :   0.35 ( 1%) usr   0.00 ( 0%) sys   0.35 ( 1%) wall
 if-conversion 2       :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 0%) wall
 peephole 2            :   0.25 ( 0%) usr   0.00 ( 0%) sys   0.25 ( 0%) wall
 rename registers      :   1.46 ( 2%) usr   0.03 ( 4%) sys   1.50 ( 2%) wall
 scheduling 2          :   1.58 ( 2%) usr   0.06 ( 8%) sys   1.64 ( 2%) wall
 reorder blocks        :   0.09 ( 0%) usr   0.00 ( 0%) sys   0.09 ( 0%) wall
 shorten branches      :   0.24 ( 0%) usr   0.02 ( 3%) sys   0.23 ( 0%) wall
 final                 :   0.43 ( 1%) usr   0.01 ( 1%) sys   0.45 ( 1%) wall
 symout                :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 0%) wall
 rest of compilation   :   1.16 ( 2%) usr   0.01 ( 1%) sys   1.17 ( 2%) wall
 TOTAL                 :  68.80             0.73            70.03

Output of -ftime-report with -O3 after the patch:

Execution times (seconds)
 garbage collection    :  10.32 (13%) usr   0.05 ( 6%) sys  10.38 (13%) wall
 cfg construction      :   0.63 ( 1%) usr   0.00 ( 0%) sys   0.64 ( 1%) wall
 cfg cleanup           :   2.93 ( 4%) usr   0.01 ( 1%) sys   2.91 ( 4%) wall
 trivially dead code   :   1.95 ( 2%) usr   0.01 ( 1%) sys   2.02 ( 2%) wall
 life analysis         :   2.82 ( 4%) usr   0.00 ( 0%) sys   2.85 ( 4%) wall
 life info update      :   0.89 ( 1%) usr   0.00 ( 0%) sys   0.89 ( 1%) wall
 preprocessing         :   0.21 ( 0%) usr   0.04 ( 5%) sys   0.22 ( 0%) wall
 lexical analysis      :   0.51 ( 1%) usr   0.10 (12%) sys   0.62 ( 1%) wall
 parser                :   9.49 (12%) usr   0.24 (30%) sys   9.75 (12%) wall
 expand                :  14.10 (18%) usr   0.02 ( 2%) sys  14.11 (17%) wall
 varconst              :   0.34 ( 0%) usr   0.02 ( 2%) sys   0.38 ( 0%) wall
 integration           :   1.60 ( 2%) usr   0.00 ( 0%) sys   1.62 ( 2%) wall
 jump                  :   1.12 ( 1%) usr   0.05 ( 6%) sys   1.16 ( 1%) wall
 CSE                   :  11.42 (14%) usr   0.02 ( 2%) sys  11.42 (14%) wall
 global CSE            :   2.47 ( 3%) usr   0.00 ( 0%) sys   2.44 ( 3%) wall
 loop analysis         :   1.03 ( 1%) usr   0.03 ( 4%) sys   1.05 ( 1%) wall
 CSE 2                 :   4.02 ( 5%) usr   0.01 ( 1%) sys   4.03 ( 5%) wall
 branch prediction     :   0.06 ( 0%) usr   0.00 ( 0%) sys   0.07 ( 0%) wall
 flow analysis         :   0.23 ( 0%) usr   0.00 ( 0%) sys   0.24 ( 0%) wall
 combiner              :   1.62 ( 2%) usr   0.00 ( 0%) sys   1.61 ( 2%) wall
 if-conversion         :   0.10 ( 0%) usr   0.00 ( 0%) sys   0.09 ( 0%) wall
 regmove               :   0.42 ( 1%) usr   0.00 ( 0%) sys   0.44 ( 1%) wall
 mode switching        :   0.17 ( 0%) usr   0.00 ( 0%) sys   0.17 ( 0%) wall
 local alloc           :   1.36 ( 2%) usr   0.01 ( 1%) sys   1.39 ( 2%) wall
 global alloc          :   2.53 ( 3%) usr   0.03 ( 4%) sys   2.52 ( 3%) wall
 reload CSE regs       :   1.86 ( 2%) usr   0.00 ( 0%) sys   1.85 ( 2%) wall
 flow 2                :   0.32 ( 0%) usr   0.01 ( 1%) sys   0.33 ( 0%) wall
 if-conversion 2       :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall
 peephole 2            :   0.28 ( 0%) usr   0.01 ( 1%) sys   0.28 ( 0%) wall
 rename registers      :   1.59 ( 2%) usr   0.01 ( 1%) sys   1.59 ( 2%) wall
 scheduling 2          :   1.64 ( 2%) usr   0.08 (10%) sys   1.72 ( 2%) wall
 reorder blocks        :   0.13 ( 0%) usr   0.00 ( 0%) sys   0.13 ( 0%) wall
 shorten branches      :   0.26 ( 0%) usr   0.03 ( 4%) sys   0.30 ( 0%) wall
 final                 :   0.48 ( 1%) usr   0.03 ( 4%) sys   0.52 ( 1%) wall
 symout                :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
 rest of compilation   :   1.35 ( 2%) usr   0.00 ( 0%) sys   1.35 ( 2%) wall
 TOTAL                 :  80.30             0.81            81.11

I'm very prone to making stupid mistakes right now, so someone ought to
verify this.

Janis

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

* Re: patch that caused part of the compile-time regression in PR opt/8361
  2003-01-31 10:56 patch that caused part of the compile-time regression in PR opt/8361 Janis Johnson
@ 2003-01-31 11:07 ` Andreas Jaeger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jaeger @ 2003-01-31 11:07 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc, pfeifer, bangerth

Janis Johnson <janis187@us.ibm.com> writes:

> I've been sick for a couple of weeks without much brainpower, but
> enough to build compilers and run tests occasionally.  I'm trying to
> track down changes that increased compile times for generate.ii from
> PR 8361.  This particular test case occasionally causes ICEs and
> sometimes gets compiler errors, so it's not a good candiate for a
> binary search; also, I wanted to keep track of times for multiple
> optimizations.  There are some other jumps later that I'll continue to
> look into, but the first big one is caused by this patch:
>
> 2002-04-27  Kurt Garloff <garloff@suse.de>
>
>         * tree-inline.c (inlinable_function_p): Improve heuristics
>         by using a smoother function to cut down allowable inlinable size.
>         * param.def: Add parameters max-inline-insns-single,
>         max-inline-slope, min-inline-insns that determine the exact
>         shape of the above function.
>         * param.h: Likewise.

Which makes sense since that patch allowed inlining of more functions
than before, resulting in better optimized binaries.  

I fear we always have this kind of problem that with adding
optimizations or - as in this case - making optimizations more
aggressive, gcc might slow down. :-(

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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

end of thread, other threads:[~2003-01-31  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-31 10:56 patch that caused part of the compile-time regression in PR opt/8361 Janis Johnson
2003-01-31 11:07 ` Andreas Jaeger

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