public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44483]  New: [4.6 regression] gcc consumes all available memory when optimizing
@ 2010-06-09 17:42 martin at mpa-garching dot mpg dot de
  2010-06-09 17:43 ` [Bug c/44483] " martin at mpa-garching dot mpg dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2010-06-09 17:42 UTC (permalink / raw)
  To: gcc-bugs

When compiling the attached testcase, current trunk gcc uses all available
memory on my system (4GB) and then swaps until I interrupt the process. This
only happens with -O3; using -O2 works as expected.
gcc 4.5 comiles the file as expected with -O3.

/scratch/tmp/devel2/build.linux_gcc/libcfitsio>gcc -c -O3 -v checksum.i
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /scratch/martin/gcc/configure --disable-bootstrap
--enable-gold --enable-plugins --prefix=/afs/mpa/data/martin/ugcc
--with-ppl=/afs/mpa/data/martin/numlibs64
--with-cloog=/afs/mpa/data/martin/numlibs64
--with-libelf=/afs/mpa/data/martin/numlibs64 --enable-languages=c++,fortran
--enable-target=all --enable-checking=release
Thread model: posix
gcc version 4.6.0 20100609 (experimental) [trunk revision 160476] (GCC) 
COLLECT_GCC_OPTIONS='-c' '-O3' '-v' '-mtune=generic' '-march=x86-64'
 /afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1
-fpreprocessed checksum.i -quiet -dumpbase checksum.i -mtune=generic
-march=x86-64 -auxbase checksum -O3 -version -o /tmp/ccibJbLw.s
GNU C (GCC) version 4.6.0 20100609 (experimental) [trunk revision 160476]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.6.0 20100609 (experimental) [trunk revision 160476]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f4e23293da4cc17049a858a32373cf07
^C
/scratch/tmp/devel2/build.linux_gcc/libcfitsio>


-- 
           Summary: [4.6 regression] gcc consumes all available memory when
                    optimizing
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
@ 2010-06-09 17:43 ` martin at mpa-garching dot mpg dot de
  2010-06-09 19:11 ` [Bug tree-optimization/44483] " falk at debian dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2010-06-09 17:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from martin at mpa-garching dot mpg dot de  2010-06-09 17:42 -------
Created an attachment (id=20879)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20879&action=view)
test case


-- 


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
  2010-06-09 17:43 ` [Bug c/44483] " martin at mpa-garching dot mpg dot de
@ 2010-06-09 19:11 ` falk at debian dot org
  2010-06-09 22:06 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: falk at debian dot org @ 2010-06-09 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from falk at debian dot org  2010-06-09 19:11 -------
Confirmed, seems to be in if-conv. Here's a smaller test case:

int ffesum (void) {
  int ch[4], ii, jj, kk;
  char asc[32];

  for (ii = 0; ii < 4; ii++)
    {
      for (jj = 0; jj < 4; jj++)
        ch[jj] = ii;
      for (kk = 0; kk < 13; kk++)
        for (jj = 0; jj < 4; jj += 2)
          if ((unsigned char) ch[jj] || (unsigned char) ch[jj + 1])
            ch[jj]++;
      for (jj = 0; jj < 4; jj++)
        asc[4 * jj + ii] = ch[jj];
    }
  return asc[0];
}


-- 

falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |tree-optimization
     Ever Confirmed|0                           |1


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
  2010-06-09 17:43 ` [Bug c/44483] " martin at mpa-garching dot mpg dot de
  2010-06-09 19:11 ` [Bug tree-optimization/44483] " falk at debian dot org
@ 2010-06-09 22:06 ` hjl dot tools at gmail dot com
  2010-06-09 22:13 ` spop at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-06-09 22:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-06-09 22:06 -------
It is caused by revision 159886:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00942.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu dot org
   Target Milestone|---                         |4.6.0


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
                   ` (2 preceding siblings ...)
  2010-06-09 22:06 ` hjl dot tools at gmail dot com
@ 2010-06-09 22:13 ` spop at gcc dot gnu dot org
  2010-06-10 22:59 ` spop at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-09 22:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from spop at gcc dot gnu dot org  2010-06-09 22:13 -------
Mine.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|0000-00-00 00:00:00         |2010-06-09 22:13:10
               date|                            |


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
                   ` (3 preceding siblings ...)
  2010-06-09 22:13 ` spop at gcc dot gnu dot org
@ 2010-06-10 22:59 ` spop at gcc dot gnu dot org
  2010-06-11 18:28 ` spop at gcc dot gnu dot org
  2010-06-11 18:30 ` spop at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-10 22:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from spop at gcc dot gnu dot org  2010-06-10 22:59 -------
Patch http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01155.html


-- 


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
                   ` (4 preceding siblings ...)
  2010-06-10 22:59 ` spop at gcc dot gnu dot org
@ 2010-06-11 18:28 ` spop at gcc dot gnu dot org
  2010-06-11 18:30 ` spop at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-11 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from spop at gcc dot gnu dot org  2010-06-11 18:28 -------
Subject: Bug 44483

Author: spop
Date: Fri Jun 11 18:28:17 2010
New Revision: 160625

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160625
Log:
Fix PR44483: incrementally gimplify BB predicates to avoid redundant
computations.

2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>

        PR middle-end/44483
        * tree-if-conv.c (bb_predicate_s): New struct.
        (bb_predicate_p): New.
        (bb_has_predicate): New.
        (bb_predicate): New.
        (set_bb_predicate): New.
        (bb_predicate_gimplified_stmts): New.
        (set_bb_predicate_gimplified_stmts): New.
        (add_bb_predicate_gimplified_stmts): New.
        (init_bb_predicate): New.
        (free_bb_predicate): New.
        (is_predicated): Use bb_predicate.
        (add_to_predicate_list): Use bb_predicate and set_bb_predicate.
        (predicate_bbs): Same.  Gimplify the condition of the basic blocks
        before processing their successors.
        (clean_predicate_lists): Removed.
        (find_phi_replacement_condition): Use bb_predicate.
        (process_phi_nodes): Renamed ifconvert_phi_nodes.  Avoid useless
        computations.
        (insert_gimplified_predicates): New.
        (combine_blocks): Call insert_gimplified_predicates.
        (tree_if_conversion): Call free_bb_predicate instead of
        clean_predicate_lists.

        * gcc.dg/tree-ssa/pr44483.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr44483.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-if-conv.c


-- 


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


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

* [Bug tree-optimization/44483] [4.6 regression] gcc consumes all available memory when optimizing
  2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
                   ` (5 preceding siblings ...)
  2010-06-11 18:28 ` spop at gcc dot gnu dot org
@ 2010-06-11 18:30 ` spop at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: spop at gcc dot gnu dot org @ 2010-06-11 18:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from spop at gcc dot gnu dot org  2010-06-11 18:30 -------
Fixed.


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-06-11 18:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 17:42 [Bug c/44483] New: [4.6 regression] gcc consumes all available memory when optimizing martin at mpa-garching dot mpg dot de
2010-06-09 17:43 ` [Bug c/44483] " martin at mpa-garching dot mpg dot de
2010-06-09 19:11 ` [Bug tree-optimization/44483] " falk at debian dot org
2010-06-09 22:06 ` hjl dot tools at gmail dot com
2010-06-09 22:13 ` spop at gcc dot gnu dot org
2010-06-10 22:59 ` spop at gcc dot gnu dot org
2010-06-11 18:28 ` spop at gcc dot gnu dot org
2010-06-11 18:30 ` spop at gcc dot gnu dot org

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