This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiler uses a lot of memory for large initialized arrays
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Ian Lance Taylor" <ian at wasabisystems dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 2 Dec 2004 18:33:29 +0100
- Subject: Re: Compiler uses a lot of memory for large initialized arrays
- References: <m3wtw0u1i7.fsf@gossamer.airs.com>
Ian Lance Taylor <ian@wasabisystems.com> wrote:
> A customer just handed me a test case in which the compiler uses way
> too much memory when compiling a large array initialization. This
> turns out to be PR 12245, which previously didn't have a test case
> attached to it.
Check also PR 14179, which is the same issue for C++. The testcase has 4
millions of initializers. We have almost fixed that testcase (that is: we do
much better than a few months ago), and I have been meaning to post the
final patch (to process_init_constructor) for a long time now. With that
patch on, we can compile the testcase with about 220Mb of RAM.
There are other optimizations that can be done here and there. For instance,
the CONSTRUCTOR_ELTS could be using Nathan's Vec where fesable, instead of
TREE_LISTs.
--
Giovanni Bajo