public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug optimization/12440] [3.3/3.4 Regression] gcc 3.3.1 on i386 linux 2.4.22 crashes during compilation of quicktime4linux 2.0.0
Date: Sat, 10 Jan 2004 23:07:00 -0000	[thread overview]
Message-ID: <20040110230733.11384.qmail@sources.redhat.com> (raw)
In-Reply-To: <20030929084127.12440.fritz@reichmann.tv>


------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz  2004-01-10 23:07 -------
Subject: Re:  [3.3/3.4 Regression] gcc 3.3.1 on i386 linux 2.4.22 crashes during compilation of quicktime4linux 2.0.0

Hello,

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-10 19:41 -------
> Zdenek could you look at this one too, as this is another loop
> optimization problem that causes memory problems.

the problem is in the old loop optimizer, for which I am not really an
expert.

But it actually is easy to analyse: the loop optimizer consumes memory for
temporary expressions during iv discovery and optimizations (and gc is
only called on the end of the pass), which becomes a problem in case
there is a function with hundreds of nice small loops.  This patch
prevents the memory explosion by adding gc after each loop; I am just
regtesting it.

Zdenek

Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.485
diff -c -3 -p -r1.485 loop.c
*** loop.c	6 Jan 2004 16:51:17 -0000	1.485
--- loop.c	10 Jan 2004 23:04:56 -0000
*************** Software Foundation, 59 Temple Place - S
*** 65,70 ****
--- 65,71 ----
  #include "insn-flags.h"
  #include "optabs.h"
  #include "cfgloop.h"
+ #include "ggc.h"
  
  /* Not really meaningful values, but at least something.  */
  #ifndef SIMULTANEOUS_PREFETCHES
*************** loop_optimize (rtx f, FILE *dumpfile, in
*** 534,540 ****
        struct loop *loop = &loops->array[i];
  
        if (! loop->invalid && loop->end)
! 	scan_loop (loop, flags);
      }
  
    end_alias_analysis ();
--- 535,544 ----
        struct loop *loop = &loops->array[i];
  
        if (! loop->invalid && loop->end)
! 	{
! 	  scan_loop (loop, flags);
! 	  ggc_collect ();
! 	}
      }
  
    end_alias_analysis ();
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1217
diff -c -3 -p -r1.1217 Makefile.in
*** Makefile.in	9 Jan 2004 01:18:35 -0000	1.1217
--- Makefile.in	10 Jan 2004 23:05:01 -0000
*************** value-prof.o : value-prof.c $(CONFIG_H) 
*** 1676,1682 ****
  loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h $(LOOP_H) \
     insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
     real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h cfgloop.h \
!    toplev.h varray.h except.h cselib.h $(OPTABS_H) $(TM_P_H)
  doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
     $(LOOP_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h \
     cfgloop.h
--- 1676,1682 ----
  loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h $(LOOP_H) \
     insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
     real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h cfgloop.h \
!    toplev.h varray.h except.h cselib.h $(OPTABS_H) $(TM_P_H) $(GGC_H)
  doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
     $(LOOP_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h \
     cfgloop.h


-- 


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


  parent reply	other threads:[~2004-01-10 23:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29  8:48 [Bug c/12440] New: " fritz at reichmann dot tv
2003-09-29  8:49 ` [Bug c/12440] " fritz at reichmann dot tv
2003-09-29  8:52 ` fritz at reichmann dot tv
2003-09-29  8:57 ` fritz at reichmann dot tv
2003-09-29  8:58 ` fritz at reichmann dot tv
2003-09-29  9:00 ` fritz at reichmann dot tv
2003-09-29  9:08 ` fritz at reichmann dot tv
2003-09-29  9:42 ` falk at debian dot org
2003-09-29  9:56 ` fritz at reichmann dot tv
2003-09-29 10:34 ` fritz at reichmann dot tv
2003-10-02 18:07 ` [Bug optimization/12440] " pinskia at gcc dot gnu dot org
2004-01-02  4:03 ` pinskia at gcc dot gnu dot org
2004-01-02  4:08 ` pinskia at gcc dot gnu dot org
2004-01-02  4:09 ` [Bug optimization/12440] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2004-01-02  4:10 ` pinskia at gcc dot gnu dot org
2004-01-10 19:41 ` pinskia at gcc dot gnu dot org
2004-01-10 23:07 ` rakdver at atrey dot karlin dot mff dot cuni dot cz [this message]
2004-01-14  3:44 ` pinskia at gcc dot gnu dot org
2004-01-20 16:56 ` [Bug optimization/12440] [3.3/3.4/3.5 " cvs-commit at gcc dot gnu dot org
2004-01-20 17:13 ` [Bug optimization/12440] [3.3/3.4 " pinskia at gcc dot gnu dot org
2004-01-24 11:19 ` cvs-commit at gcc dot gnu dot org
2004-01-24 15:16 ` [Bug optimization/12440] [3.3 " pinskia at gcc dot gnu dot org
2004-01-27 13:05 ` cvs-commit at gcc dot gnu dot org
2004-01-29  4:42 ` cvs-commit at gcc dot gnu dot org
2004-01-29  4:43 ` gdr at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040110230733.11384.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).