public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26854]  New: Inordinate compile times on large routines
@ 2006-03-24 20:25 lucier at math dot purdue dot edu
  2006-03-25 16:21 ` [Bug tree-optimization/26854] " rguenth at gcc dot gnu dot org
                   ` (73 more replies)
  0 siblings, 74 replies; 96+ messages in thread
From: lucier at math dot purdue dot edu @ 2006-03-24 20:25 UTC (permalink / raw)
  To: gcc-bugs

At this location:

http://www.math.purdue.edu/~lucier/gcc/test-files/bugzilla/1/all.i.gz

is the file

-rw-r--r--    1 lucier  lucier  6556015 Mar 22 20:28 all.i.gz

On a 2GHz Mac G5, this file took 3.4GB and 30 minutes to compile using
gcc-4.1.0 configured and compiled with

/bin/rm -rf *; env CC='gcc -mcpu=970 -m64' ../configure
--prefix=/pkgs/gcc-4.1.0 --with-gmp=/opt/local/ --with-mpfr=/opt/local/
--with-as=/usr/local/odcctools-20060123/bin/as
--with-ld=/usr/local/odcctools-20060123/bin/ld --enable-languages=c; make -j 8
bootstrap BOOT_CFLAGS='-mcpu=970 -m64 -O2 -g' >& build.log 

I had to build gcc as a 64-bit binary so it could allocate more than 2GB at
some point in the compilation process.  (The compiler itself, however, builds
32-bit binaries by default.)

The compile options were

/pkgs/gcc-4.1.0/bin/gcc -mcpu=970 -m64 -no-cpp-precomp -Wall -W -Wno-unused -O1
-fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing
-fwrapv -fomit-frame-pointer -fPIC -fno-common -bundle -flat_namespace
-undefined suppress -I/usr/local/Gambit-C/include/ -ftime-report -fmem-report
all.i

The reports were

Memory still allocated at the end of the compilation process
Size   Allocated        Used    Overhead
8             16k         14k        480 
16            52k         12k       1144 
64          1276k       1239k         19k
256          484k        452k       6776 
512           36k         25k        504 
1024         220k        216k       3080 
2048          24k         20k        336 
4096          68k         68k        952 
8192          56k         56k        392 
16384         16k         16k         56 
32768        288k        288k        504 
65536         64k         64k         56 
131072        128k        128k         56 
262144        512k        512k        112 
524288        512k        512k         56 
1048576       1024k       1024k         56 
2097152       4096k       4096k        112 
112           34M         16M        484k
208           40k         38k        560 
192         3344k       3287k         45k
160           28k       6240         392 
176          564k        261k       7896 
48          2088k       1165k         32k
32           148k         68k       2664 
80            35M       2063k        495k
Total         84M         32M       1104k

String pool
entries         158178
identifiers     158178 (100.00%)
slots           262144
bytes           1982k (168k overhead)
table size      2048k
coll/search     1.1104
ins/search      0.1934
avg. entry      12.83 bytes (+/- 7.81)
longest entry   67

??? tree nodes created

(No per-node statistics)
Type hash: size 1021, 598 elements, 0.900368 collisions
DECL_DEBUG_EXPR  hash: size 8191, 0 elements, 1.307819 collisions
DECL_VALUE_EXPR  hash: size 1021, 0 elements, 0.000000 collisions

Execution times (seconds)
 garbage collection    :   1.87 ( 0%) usr   0.03 ( 0%) sys   2.38 ( 0%) wall   
   0 kB ( 0%) ggc
 callgraph construction:   1.78 ( 0%) usr   0.36 ( 0%) sys   2.60 ( 0%) wall  
21241 kB ( 2%) ggc
 callgraph optimization:   0.05 ( 0%) usr   0.00 ( 0%) sys   0.06 ( 0%) wall   
   0 kB ( 0%) ggc
 ipa reference         :   0.42 ( 0%) usr   0.14 ( 0%) sys   0.65 ( 0%) wall   
   7 kB ( 0%) ggc
 cfg construction      :   0.35 ( 0%) usr   0.00 ( 0%) sys   0.43 ( 0%) wall   
8421 kB ( 1%) ggc
 cfg cleanup           : 103.72 ( 7%) usr   0.71 ( 1%) sys 128.58 ( 7%) wall   
2170 kB ( 0%) ggc
 trivially dead code   :   2.60 ( 0%) usr   0.06 ( 0%) sys   3.32 ( 0%) wall   
   0 kB ( 0%) ggc
 life analysis         :   6.42 ( 0%) usr   3.91 ( 3%) sys  12.64 ( 1%) wall  
19365 kB ( 2%) ggc
 life info update      :   1.04 ( 0%) usr   0.03 ( 0%) sys   1.32 ( 0%) wall   
 525 kB ( 0%) ggc
 alias analysis        :   1.70 ( 0%) usr   0.07 ( 0%) sys   2.13 ( 0%) wall  
16385 kB ( 2%) ggc
 register scan         :   0.96 ( 0%) usr   0.02 ( 0%) sys   1.28 ( 0%) wall   
   4 kB ( 0%) ggc
 rebuild jump labels   :   0.32 ( 0%) usr   0.00 ( 0%) sys   0.38 ( 0%) wall   
   0 kB ( 0%) ggc
 preprocessing         :   8.05 ( 1%) usr  13.05 (10%) sys  25.54 ( 1%) wall   
2197 kB ( 0%) ggc
 lexical analysis      :  12.59 ( 1%) usr  25.04 (19%) sys  46.78 ( 2%) wall   
   0 kB ( 0%) ggc
 parser                :   9.97 ( 1%) usr  13.25 (10%) sys  28.99 ( 1%) wall  
72677 kB ( 7%) ggc
 tree gimplify         :   1.50 ( 0%) usr   0.07 ( 0%) sys   1.93 ( 0%) wall  
30969 kB ( 3%) ggc
 tree eh               :   0.17 ( 0%) usr   0.01 ( 0%) sys   0.21 ( 0%) wall   
   0 kB ( 0%) ggc
 tree CFG construction :   0.55 ( 0%) usr   0.13 ( 0%) sys   0.81 ( 0%) wall  
76077 kB ( 8%) ggc
 tree CFG cleanup      :   5.82 ( 0%) usr   0.08 ( 0%) sys   7.25 ( 0%) wall   
 955 kB ( 0%) ggc
 tree copy propagation :   5.42 ( 0%) usr   0.44 ( 0%) sys   7.11 ( 0%) wall  
12020 kB ( 1%) ggc
 tree store copy prop  :   0.75 ( 0%) usr   0.05 ( 0%) sys   0.97 ( 0%) wall   
1600 kB ( 0%) ggc
 tree find ref. vars   :   0.23 ( 0%) usr   0.01 ( 0%) sys   0.24 ( 0%) wall   
2502 kB ( 0%) ggc
 tree PTA              :   5.85 ( 0%) usr   0.60 ( 0%) sys   7.92 ( 0%) wall  
16435 kB ( 2%) ggc
 tree alias analysis   :   6.98 ( 0%) usr  11.11 ( 8%) sys  15.83 ( 1%) wall  
11736 kB ( 1%) ggc
 tree PHI insertion    :   1.06 ( 0%) usr   0.21 ( 0%) sys   1.59 ( 0%) wall  
24377 kB ( 2%) ggc
 tree SSA rewrite      :   2.46 ( 0%) usr   0.16 ( 0%) sys   3.29 ( 0%) wall  
39166 kB ( 4%) ggc
 tree SSA other        :   1.22 ( 0%) usr   1.51 ( 1%) sys   3.38 ( 0%) wall   
   0 kB ( 0%) ggc
 tree SSA incremental  :  14.15 ( 1%) usr   3.76 ( 3%) sys  22.12 ( 1%) wall  
19167 kB ( 2%) ggc
 tree operand scan     : 628.65 (44%) usr  12.18 ( 9%) sys 814.05 (42%) wall  
23896 kB ( 2%) ggc
 dominator optimization: 307.01 (21%) usr   2.88 ( 2%) sys 380.36 (20%) wall  
63887 kB ( 7%) ggc
 tree STORE-CCP        :   0.67 ( 0%) usr   0.02 ( 0%) sys   0.87 ( 0%) wall   
 513 kB ( 0%) ggc
 tree CCP              :   0.74 ( 0%) usr   0.03 ( 0%) sys   0.95 ( 0%) wall   
 514 kB ( 0%) ggc
 tree split crit edges :   0.37 ( 0%) usr   0.24 ( 0%) sys   0.74 ( 0%) wall  
40362 kB ( 4%) ggc
 tree reassociation    :   0.57 ( 0%) usr   0.02 ( 0%) sys   0.73 ( 0%) wall   
   0 kB ( 0%) ggc
 tree FRE              :  12.97 ( 1%) usr   0.75 ( 1%) sys  17.03 ( 1%) wall  
40945 kB ( 4%) ggc
 tree code sinking     :   0.98 ( 0%) usr   0.06 ( 0%) sys   1.27 ( 0%) wall   
   0 kB ( 0%) ggc
 tree linearize phis   :   0.15 ( 0%) usr   0.01 ( 0%) sys   0.20 ( 0%) wall   
   0 kB ( 0%) ggc
 tree forward propagate:   0.16 ( 0%) usr   0.01 ( 0%) sys   0.18 ( 0%) wall   
   0 kB ( 0%) ggc
 tree conservative DCE :   1.86 ( 0%) usr   0.03 ( 0%) sys   2.39 ( 0%) wall   
   0 kB ( 0%) ggc
 tree aggressive DCE   :   0.86 ( 0%) usr   0.02 ( 0%) sys   1.09 ( 0%) wall   
   0 kB ( 0%) ggc
 tree DSE              :   0.73 ( 0%) usr   0.03 ( 0%) sys   0.95 ( 0%) wall   
   0 kB ( 0%) ggc
 PHI merge             :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall   
  49 kB ( 0%) ggc
 tree loop bounds      :   0.32 ( 0%) usr   0.01 ( 0%) sys   0.39 ( 0%) wall   
   0 kB ( 0%) ggc
 loop invariant motion :   0.57 ( 0%) usr   0.01 ( 0%) sys   0.70 ( 0%) wall   
   0 kB ( 0%) ggc
 tree canonical iv     :   0.15 ( 0%) usr   0.01 ( 0%) sys   0.20 ( 0%) wall   
   0 kB ( 0%) ggc
 scev constant prop    :   1.47 ( 0%) usr   0.04 ( 0%) sys   1.87 ( 0%) wall   
1973 kB ( 0%) ggc
 complete unrolling    :   0.07 ( 0%) usr   0.00 ( 0%) sys   0.07 ( 0%) wall   
   0 kB ( 0%) ggc
 tree loop init        :   5.14 ( 0%) usr   5.80 ( 4%) sys  13.36 ( 1%) wall  
58726 kB ( 6%) ggc
 tree loop fini        :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall   
   0 kB ( 0%) ggc
 tree copy headers     :   0.24 ( 0%) usr   0.01 ( 0%) sys   0.31 ( 0%) wall   
   0 kB ( 0%) ggc
 tree SSA uncprop      :   0.43 ( 0%) usr   0.01 ( 0%) sys   0.54 ( 0%) wall   
   0 kB ( 0%) ggc
 tree SSA to normal    : 172.90 (12%) usr   1.50 ( 1%) sys 215.20 (11%) wall  
92392 kB ( 9%) ggc
 tree rename SSA copies:   0.60 ( 0%) usr   0.08 ( 0%) sys   0.78 ( 0%) wall   
   0 kB ( 0%) ggc
 dominance frontiers   :   0.53 ( 0%) usr   0.00 ( 0%) sys   0.64 ( 0%) wall   
   0 kB ( 0%) ggc
 expand                :   7.54 ( 1%) usr   4.20 ( 3%) sys  14.47 ( 1%) wall 
129307 kB (13%) ggc
 varconst              :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall   
   7 kB ( 0%) ggc
 jump                  :   0.73 ( 0%) usr   0.03 ( 0%) sys   0.90 ( 0%) wall   
   0 kB ( 0%) ggc
 CSE                   :   2.19 ( 0%) usr   1.67 ( 1%) sys   4.78 ( 0%) wall   
2169 kB ( 0%) ggc
 loop analysis         :   1.69 ( 0%) usr   0.15 ( 0%) sys   2.25 ( 0%) wall   
8645 kB ( 1%) ggc
 branch prediction     :   3.22 ( 0%) usr   0.22 ( 0%) sys   4.17 ( 0%) wall   
5998 kB ( 1%) ggc
 flow analysis         :   0.21 ( 0%) usr   0.00 ( 0%) sys   0.27 ( 0%) wall   
   0 kB ( 0%) ggc
 combiner              :   4.03 ( 0%) usr   0.11 ( 0%) sys   5.07 ( 0%) wall  
31600 kB ( 3%) ggc
 if-conversion         :   2.01 ( 0%) usr   0.11 ( 0%) sys   2.58 ( 0%) wall   
 344 kB ( 0%) ggc
 local alloc           :   2.87 ( 0%) usr   0.10 ( 0%) sys   3.63 ( 0%) wall  
13500 kB ( 1%) ggc
 global alloc          :  25.97 ( 2%) usr  21.91 (17%) sys  57.82 ( 3%) wall  
31337 kB ( 3%) ggc
 reload CSE regs       :  42.61 ( 3%) usr   0.54 ( 0%) sys  52.45 ( 3%) wall  
12846 kB ( 1%) ggc
 flow 2                :   0.66 ( 0%) usr   0.00 ( 0%) sys   0.82 ( 0%) wall   
  19 kB ( 0%) ggc
 if-conversion 2       :   0.77 ( 0%) usr   0.06 ( 0%) sys   1.03 ( 0%) wall   
  14 kB ( 0%) ggc
 rename registers      :   0.95 ( 0%) usr   0.20 ( 0%) sys   1.37 ( 0%) wall   
  24 kB ( 0%) ggc
 scheduling 2          :   3.51 ( 0%) usr   0.18 ( 0%) sys   4.47 ( 0%) wall  
36103 kB ( 4%) ggc
 shorten branches      :   0.17 ( 0%) usr   0.00 ( 0%) sys   0.21 ( 0%) wall   
   0 kB ( 0%) ggc
 final                 :   2.35 ( 0%) usr   0.14 ( 0%) sys   3.36 ( 0%) wall   
4096 kB ( 0%) ggc
 symout                :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.02 ( 0%) wall   
   0 kB ( 0%) ggc
 TOTAL                 :1438.01           131.69          1949.05            
979456 kB

So, this is a very large file (and only one C routine), but the times for the
various passes are very unbalanced; in particular the following three catch
anyone's eye:

 tree operand scan     : 628.65 (44%) usr  12.18 ( 9%) sys 814.05 (42%) wall  
23896 kB ( 2%) ggc
 dominator optimization: 307.01 (21%) usr   2.88 ( 2%) sys 380.36 (20%) wall  
63887 kB ( 7%) ggc
 tree SSA to normal    : 172.90 (12%) usr   1.50 ( 1%) sys 215.20 (11%) wall  
92392 kB ( 9%) ggc

I don't know what the compile times are with 4.2; perhaps people who have a
64-bit profiled gcc would like to investigate more what is going on.


-- 
           Summary: Inordinate compile times on large routines
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lucier at math dot purdue dot edu
 GCC build triplet: powerpc-apple-darwin8.5.0
  GCC host triplet: powerpc-apple-darwin8.5.0
GCC target triplet: powerpc-apple-darwin8.5.0


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


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

end of thread, other threads:[~2023-02-15 14:06 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-26854-4@http.gcc.gnu.org/bugzilla/>
2011-01-18 14:42 ` [Bug tree-optimization/26854] Inordinate compile times on large routines rguenth at gcc dot gnu.org
2011-01-18 15:08 ` hubicka at gcc dot gnu.org
2011-01-18 15:15 ` dberlin at gcc dot gnu.org
2011-01-18 15:51 ` hubicka at ucw dot cz
2011-01-18 15:53 ` dberlin at gcc dot gnu.org
2011-01-24 23:03 ` jsm28 at gcc dot gnu.org
2011-01-24 23:47 ` ian at airs dot com
2011-02-02 17:54 ` dnovillo at gcc dot gnu.org
2015-07-04  9:59 ` bonzini at gnu dot org
2021-12-17  7:40 ` pinskia at gcc dot gnu.org
2021-12-17 20:21 ` lucier at math dot purdue.edu
2021-12-17 20:24 ` lucier at math dot purdue.edu
2022-01-03 10:48 ` rguenth at gcc dot gnu.org
2023-02-06 12:14 ` rguenth at gcc dot gnu.org
2023-02-07 13:39 ` cvs-commit at gcc dot gnu.org
2023-02-07 22:23 ` lucier at math dot purdue.edu
2023-02-08 21:53 ` lucier at math dot purdue.edu
2023-02-09  7:24 ` cvs-commit at gcc dot gnu.org
2023-02-09  7:54 ` rguenth at gcc dot gnu.org
2023-02-09  8:47 ` rguenth at gcc dot gnu.org
2023-02-13 14:55 ` rguenth at gcc dot gnu.org
2023-02-15 14:05 ` cvs-commit at gcc dot gnu.org
2006-03-24 20:25 [Bug c/26854] New: " lucier at math dot purdue dot edu
2006-03-25 16:21 ` [Bug tree-optimization/26854] " rguenth at gcc dot gnu dot org
2006-03-25 22:22 ` lucier at math dot purdue dot edu
2006-04-19  6:43 ` law at redhat dot com
2006-04-19 15:32 ` law at redhat dot com
2006-04-19 22:34 ` law at gcc dot gnu dot org
2006-04-20  3:18 ` lucier at math dot purdue dot edu
2006-04-20  3:28 ` law at redhat dot com
2006-04-20  3:39 ` lucier at math dot purdue dot edu
2006-04-20 16:13 ` law at gcc dot gnu dot org
2006-04-20 16:17 ` law at redhat dot com
2006-04-20 16:21 ` dberlin at gcc dot gnu dot org
2006-04-26 18:59 ` amacleod at redhat dot com
2006-04-27  2:29 ` amacleod at redhat dot com
2006-04-27  2:30 ` amacleod at redhat dot com
2006-04-27 20:22 ` amacleod at gcc dot gnu dot org
2006-11-30  4:36 ` lucier at math dot purdue dot edu
2006-11-30  4:54 ` dberlin at dberlin dot org
2006-12-07 17:33 ` lucier at math dot purdue dot edu
2006-12-07 17:54 ` dberlin at dberlin dot org
2006-12-07 17:54 ` dberlin at dberlin dot org
2006-12-07 21:51 ` lucier at math dot purdue dot edu
2006-12-08  1:24 ` lucier at math dot purdue dot edu
2006-12-11  6:28 ` lucier at math dot purdue dot edu
2007-01-10 18:49 ` lucier at math dot purdue dot edu
2007-01-10 19:48 ` amacleod at redhat dot com
2007-11-14  9:56 ` steven at gcc dot gnu dot org
2007-11-14 10:07 ` rguenth at gcc dot gnu dot org
2007-11-14 12:04 ` steven at gcc dot gnu dot org
2007-11-14 12:40 ` lucier at math dot purdue dot edu
2007-11-14 13:14 ` rguenth at gcc dot gnu dot org
2007-11-14 13:38 ` lucier at math dot purdue dot edu
2007-11-14 14:08 ` rguenth at gcc dot gnu dot org
2007-11-14 16:57 ` dberlin at dberlin dot org
2007-11-14 19:05 ` lucier at math dot purdue dot edu
2007-11-14 19:06 ` lucier at math dot purdue dot edu
2007-12-19 21:49 ` lucier at math dot purdue dot edu
2007-12-19 22:13 ` steven at gcc dot gnu dot org
2007-12-19 23:31 ` lucier at math dot purdue dot edu
2007-12-20  0:02 ` steven at gcc dot gnu dot org
2007-12-20  2:29 ` lucier at math dot purdue dot edu
2007-12-20  3:07 ` zadeck at naturalbridge dot com
2007-12-20  3:52 ` lucier at math dot purdue dot edu
2007-12-20 14:49 ` zadeck at naturalbridge dot com
2007-12-20 15:08 ` stevenb dot gcc at gmail dot com
2007-12-20 15:31 ` zadeck at naturalbridge dot com
2007-12-20 16:06 ` zadeck at naturalbridge dot com
2007-12-20 16:11 ` lucier at math dot purdue dot edu
2007-12-20 17:28 ` zadeck at naturalbridge dot com
2007-12-20 18:56 ` lucier at math dot purdue dot edu
2008-01-17 21:41 ` zadeck at naturalbridge dot com
2008-01-17 21:55 ` rguenth at gcc dot gnu dot org
2008-01-17 22:07 ` zadeck at naturalbridge dot com
2008-01-17 22:20 ` lucier at math dot purdue dot edu
2008-01-17 22:54 ` lucier at math dot purdue dot edu
2008-01-17 23:58 ` zadeck at naturalbridge dot com
2008-01-18  1:46 ` lucier at math dot purdue dot edu
2008-01-18  2:18 ` zadeck at naturalbridge dot com
2008-01-19  0:51 ` zadeck at gcc dot gnu dot org
2008-01-20  2:21 ` zadeck at gcc dot gnu dot org
2008-01-22 13:59 ` zadeck at gcc dot gnu dot org
2008-01-23 15:45 ` lucier at math dot purdue dot edu
2008-05-15  2:49 ` lucier at math dot purdue dot edu
2008-05-15  2:51 ` lucier at math dot purdue dot edu
2008-05-15  2:52 ` lucier at math dot purdue dot edu
2008-05-15  5:59 ` steven at gcc dot gnu dot org
2008-05-19  2:00 ` vmakarov at redhat dot com
2008-05-19  2:04 ` vmakarov at gcc dot gnu dot org
2008-05-19  2:09 ` vmakarov at redhat dot com
2008-05-19 17:55 ` lucier at math dot purdue dot edu
2008-07-10 17:37 ` lucier at math dot purdue dot edu
2008-07-10 17:45 ` lucier at math dot purdue dot edu
2008-07-10 19:38 ` rguenth at gcc dot gnu dot org
2008-07-10 19:40 ` zadeck at naturalbridge dot com
2008-09-10 13:40 ` lucier at math dot purdue dot edu

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