This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: haifa memory abuse
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: haifa memory abuse
- From: Jeffrey A Law <law at redhat dot com>
- Date: Wed, 22 Nov 2000 12:57:09 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <20001122113013.A20163@redhat.com>you write:
> Consider a function such as
>
> void foo()
> {
> bar(1);
> bar(2);
> ...
> bar(6000);
> }
>
> At present, such a function will take about 1GB to compile.
> This is due to haifa creating _exceedingly_ long dependancy
> chains for the call_insns.
>
> The problem was that we never zapped the reg_last_uses and
> reg_last_sets lists, which meant that each call_insn depended
> on every instruction before it. Yikes.
>
> This patch, bootstrapped on i686 and alphaev6, reduces peak
> memory usage for the aforementioned function to 12MB.
>
>
> r~
>
>
> * haifa-sched.c (sched_analyze_1): Don't special-case calls
> for clobbering registers.
> (sched_analyze_2): Likewise.
> (sched_analyze): Zap reg_last_uses and reg_last_sets after calls.
I wonder if this is what was causing some of my PA64 compiles to come to
a grinding halt during the second scheduling pass. I recall the insn
chains for calls being, err, long.
jeff