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: Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 23 Nov 2000 06:29:57 -0500
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20001122113013.A20163@redhat.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 22, 2000 at 11:30:13AM -0800, Richard Henderson wrote:
> 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.
Perhaps on alphaev6, but certainly on i386 (tested both -march=i386 and
-march=i686) is it still very memory hungry (I've killed when it took more than
220MB on my box).
The huge dependany chains for call_insns are gone thanks to your patch, but
(call_insn 2553 2552 2555 (call (mem:QI (symbol_ref:SI ("bar")) 0)
(const_int 16 [0x10])) 303 {*call_0} (insn_list:REG_DEP_ANTI 2550 (insn_list:REG_DEP_ANTI 2552 (nil)))
(nil)
(nil))
(insn 2555 2553 2556 (set (mem/f:SI (reg:SI 7 esp) 0)
(const_int 245 [0xf5])) 33 {*movsi_1} (insn_list 5 (insn_list 6 (insn_list 9 (insn_list 12 (insn_list 15 (insn_list 18 (insn_list 21 (insn_list 24 (insn_list 27 (insn_list 30 (insn_list 33......
but there are enormous dependancy chains still for the movsi_1 instructions
which set up its arguments.
Jakub