From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14381 invoked by alias); 19 Dec 2014 21:19:29 -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 14305 invoked by uid 48); 19 Dec 2014 21:19:21 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/62016] [4.8/4.9/5 Regression] very slow compilation at -O3 on x86_64-linux-gnu Date: Fri, 19 Dec 2014 21:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 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-12/txt/msg02435.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62016 --- Comment #8 from Jan Hubicka --- Hmm, backporting the code to turn unreachable calls to __builtin_unreachable to 4.7 is quite risky - nothin in 4.7 really cared about correctness of the analysis. While I do recall only one recent bug in that area, I think it is safer to leave it as it is. With sreal changes I guess 5.0 can update costs incrementally. The expensive part here is not really the evaulation of predicates. Just the fact that we create function with incredibly many unreachable calls (that accounts as 0) and we keep re-counting them each time we inline next call. If we just keep incrementally updating the overall size/speed of the large function, this problem will go away (and there is earlier Steven's inline bomb exposing same behaviour)