From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3090 invoked by alias); 21 Feb 2014 09:55:24 -0000 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 Received: (qmail 3039 invoked by uid 48); 21 Feb 2014 09:55:21 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs) Date: Fri, 21 Feb 2014 09:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02219.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291 --- Comment #11 from Richard Biener --- With the redundant set_mem_addr_space removed -Og now takes expand : 19.21 (31%) usr 0.60 ( 8%) sys 20.06 (29%) wall 165633 kB ( 8%) ggc TOTAL : 61.60 7.58 69.16 2047648 kB collisions are like MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B] MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B] MEM[(StgWord *)_5 + -64B] != MEM[(StgWord *)_5 + -64B] MEM[(StgWord *)_20 + 24B] != MEM[(StgWord *)_5 + -64B] investigating ... (clearly not having a recorded hash to compare that quickly with the hashtab collision handling makes things worse here). Ouch. This mem-attr hashtable is _global_! The above _5 are different SSA name objects (from different functions). The hash is global because we also have DECL_RTL for global variables, so we can't really clear it (well, we could - we'd just lose mem-attr sharing at that points). Clearing the mem-attrs htab in rest_of_clean_state () gets us to phase parsing : 5.33 (13%) usr 4.41 (58%) sys 9.74 (19%) wall 294905 kB (14%) ggc tree gimplify : 2.05 ( 5%) usr 0.20 ( 3%) sys 2.05 ( 4%) wall 252760 kB (12%) ggc tree CCP : 1.25 ( 3%) usr 0.13 ( 2%) sys 1.13 ( 2%) wall 57081 kB ( 3%) ggc expand : 1.50 ( 4%) usr 0.13 ( 2%) sys 1.63 ( 3%) wall 169767 kB ( 8%) ggc CSE : 1.29 ( 3%) usr 0.12 ( 2%) sys 1.05 ( 2%) wall 13532 kB ( 1%) ggc combiner : 2.06 ( 5%) usr 0.15 ( 2%) sys 2.10 ( 4%) wall 11785 kB ( 1%) ggc integrated RA : 4.51 (11%) usr 0.24 ( 3%) sys 4.30 ( 9%) wall 427273 kB (21%) ggc LRA non-specific : 1.26 ( 3%) usr 0.09 ( 1%) sys 1.40 ( 3%) wall 6517 kB ( 0%) ggc reload CSE regs : 1.19 ( 3%) usr 0.06 ( 1%) sys 1.40 ( 3%) wall 13638 kB ( 1%) ggc rest of compilation : 2.31 ( 5%) usr 0.18 ( 2%) sys 2.20 ( 4%) wall 40076 kB ( 2%) ggc TOTAL : 42.32 7.66 50.19 2052932 kB