This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Memory usage
- To: gcc at gcc dot gnu dot org
- Subject: Memory usage
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 30 Mar 2000 19:33:04 -0800
- Organization: CodeSourcery, LLC
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