This is the mail archive of the gcc@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]

Memory usage



As some have noted, memory usage for GCC when building itself has
recently gone through the roof.  (It now takes some 300MB on x86 to
build gcc/tree.c, all of which to compile init_obstacks, which has 30
whole lines of straightline code.

This is a double fault.  The memset builtin expander has no clamp on
the number of things to set, so it generates several thousand set
instructions one after another.  That's silly: for thousands of
instructions, we should just make the function call.  But, then, it
turns out that CSE is badly n^2 in this case, in both time and space.
I'm going to start by fixing CSE, if I can, since that's a bigger
algorithmic problem.

A temporary work-around, for those that care, is to disable the
memset/bzero builtin expander.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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