From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7739 invoked by alias); 28 Feb 2013 23:59:03 -0000 Received: (qmail 7673 invoked by uid 48); 28 Feb 2013 23:58:40 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55135] Segfault of gcc on a big file Date: Thu, 28 Feb 2013 23:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg02722.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55135 --- Comment #10 from Steven Bosscher 2013-02-28 23:58:38 UTC --- Created attachment 29557 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29557 Collected hacks to make the test case compile in reasonable time with -O0 Patch does 2 things: - Queue up to-be-removed EH regions, instead of removing them one-by-one. Removing them one at a time results in walking the list of EH regions repeatedly, thus taking O(# of EH regions ** 2) time. - Rewrite init_subregs_of_mode and subroutines to first collect the invalid mode change subregs in sbitmaps, and then converting the final sbitmap to a bitmap. This trades memory for time: the bitmap lookups are also potentially O(# of registers ** 2) and this test case has more than one million registers, many of them with invalid mode changes (to be fixed up by IRA/LRA). Peak memory at -O0 is <4GB. Compile time on a "Quad-Core AMD Opteron(tm) Processor 8354" at 2200MHz is 240s, half of it still taken up by IRA+LRA. At -O1 the einline pass is consuming almost all compile time again. -> Honza: Can we please have a proper permanent fix for this recurring problem? What's there now just Does Not Work!