This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: haifa memory abuse


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]