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]
Other format: [Raw text]

Re: [patch] Fix insn allocation size in ggc-page.c


Jim Wilson <wilson@tuliptree.org> writes:

  > Dan Nicolaescu wrote:
  > > !   RTL_SIZE (9),		/* INSN, CALL_INSN, JUMP_INSN */
  > 
  > INSN has 9, but CALL_INSN and JUMP_INSN have 10.  With this change,
  > calls and jumps no longer fit into this bucket.  That makes the
  > comment wrong.  

Ooops, would you mind fixing it? I don't have CVS write access....


  > It may also waste memory.  Since basic blocks tend to be short on
  > average, the extra 20 bytes allocated for calls and jumps might be
  > more than we save for insns.

Then maybe a better solution would be to add another bucket for CALL_INSNs
and JUMP_INSNs, if that is needed. 

I just tried all the possibilities when compiling a few of the big files
in gcc (combine.c, expr.c, fold-const.c) and the differences are not
significant. If you suggest some other tests, I'd be happy to do
them. 

I wanted to try the C++ testcase from PR8361 but it does not seem to
compile with a g++ updated this morning. I remember seeing some
significant differences in memory usage when compiling C++ code when I
wrote the patch. 
I will try again tomorrow.

  > The original intent of the code
  > is to include jumps and calls.  See
  > 	http://gcc.gnu.org/ml/gcc/2002-08/msg00884.html

Interesting. Thanks for the reference. The part of that patch that
added padding to NOTEs has been reverted now, it was actually
increased the memory consumption for NOTEs, moving them from the
32 byte bucket to the 44 byte bucket.


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