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



  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


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