Regression against last week: nearly infinite memory consumptionand long compile times with -O[12]

Wolfgang Bangerth Wolfgang.Bangerth@IWR.Uni-Heidelberg.De
Wed Jan 24 05:50:00 GMT 2001


Hi there,
for the appended example, present CVS gcc uses >700MB of memory and takes
unduly long (ca. 3min for 400 lines of self-contained code). Of course,
the memory consumption is what makes the problem (for the original code,
gcc aborted when trying to allocate >2GB). I have not seen this problem
with last week's CVS, so it must be relatively new.

The memory curve is somewhat surprising: gcc stays at relatively low mem
(20MB) for quite a long time, and only a few seconds before being done, it
grows excessively to astronomical size.

Anyway, here are the messages (similar results for -O1):

deal.II/deal.II> time gcc -Q -O2 -c t.c -o /dev/null
 my_barycenter {GC 6685k -> 3287k} {GC 5753k -> 3334k} {GC 7937k -> 3646k}
{GC 14230k -> 7410k}
Execution times (seconds)
 garbage collection    :   0.89 ( 1%) usr   0.00 ( 0%) sys   0.89 ( 1%) wall
 preprocessing         :   0.02 ( 0%) usr   0.01 ( 0%) sys   0.02 ( 0%) wall
 lexical analysis      :   0.05 ( 0%) usr   0.01 ( 0%) sys   0.06 ( 0%) wall
 parser                :   0.58 ( 0%) usr   0.04 ( 1%) sys   0.67 ( 0%) wall
 varconst              :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
 jump                  :   0.74 ( 0%) usr   0.01 ( 0%) sys   0.78 ( 0%) wall
 CSE                   :   1.74 ( 1%) usr   0.04 ( 1%) sys   1.76 ( 1%) wall
 global CSE            :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall
 loop analysis         :   0.11 ( 0%) usr   0.00 ( 0%) sys   0.12 ( 0%) wall
 CSE 2                 :   1.46 ( 1%) usr   0.00 ( 0%) sys   1.48 ( 1%) wall
 flow analysis         :   0.47 ( 0%) usr   0.06 ( 1%) sys   0.53 ( 0%) wall
 combiner              :   0.34 ( 0%) usr   0.00 ( 0%) sys   0.34 ( 0%) wall
 if-conversion         :   0.11 ( 0%) usr   0.01 ( 0%) sys   0.13 ( 0%) wall
 regmove               :   0.62 ( 0%) usr   0.00 ( 0%) sys   0.63 ( 0%) wall
 local alloc           :   0.95 ( 1%) usr   0.02 ( 0%) sys   0.97 ( 1%) wall
 global alloc          : 132.70 (79%) usr   0.20 ( 4%) sys 134.06 (77%) wall
 reload CSE regs       :  19.08 (11%) usr   0.01 ( 0%) sys  19.17 (11%) wall
 flow 2                :   0.69 ( 0%) usr   0.02 ( 0%) sys   0.71 ( 0%) wall
 if-conversion 2       :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 0%) wall
 peephole 2            :   0.30 ( 0%) usr   0.00 ( 0%) sys   0.30 ( 0%) wall
 scheduling 2          :   5.36 ( 3%) usr   4.31 (90%) sys   9.71 ( 6%) wall
 reorder blocks        :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
 shorten branches      :   0.21 ( 0%) usr   0.00 ( 0%) sys   0.20 ( 0%) wall
 reg stack             :   0.45 ( 0%) usr   0.01 ( 0%) sys   0.47 ( 0%) wall
 final                 :   0.35 ( 0%) usr   0.01 ( 0%) sys   0.35 ( 0%) wall
 symout                :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
 rest of compilation   :   0.52 ( 0%) usr   0.00 ( 0%) sys   0.52 ( 0%) wall
 TOTAL                 : 167.94             4.78           174.32

real    2m55.019s
user    2m48.210s
sys     0m4.850s


Best regards
  Wolfgang

-------------------------------------------------------------------------
Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                             www: http://gaia.iwr.uni-heidelberg.de/~wolf



More information about the Gcc-bugs mailing list