From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29958 invoked by alias); 2 Dec 2004 17:33:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29820 invoked from network); 2 Dec 2004 17:33:30 -0000 Received: from unknown (HELO develer.com) (151.38.19.110) by sourceware.org with SMTP; 2 Dec 2004 17:33:30 -0000 Received: (qmail 5264 invoked from network); 2 Dec 2004 17:33:29 -0000 Received: from mimas.trilan (HELO mimas) (10.3.3.245) by ns.trilan with SMTP; 2 Dec 2004 17:33:29 -0000 Message-ID: <067a01c4d895$095aaa40$f503030a@mimas> From: "Giovanni Bajo" To: "Ian Lance Taylor" Cc: References: Subject: Re: Compiler uses a lot of memory for large initialized arrays Date: Thu, 02 Dec 2004 17:33:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00136.txt.bz2 Ian Lance Taylor 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