From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10652 invoked by alias); 19 Dec 2010 11:44:09 -0000 Received: (qmail 10641 invoked by uid 22791); 19 Dec 2010 11:44:09 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Dec 2010 11:44:05 +0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed 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 Date: Sun, 19 Dec 2010 11:44:00 -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 X-SW-Source: 2010-12/txt/msg02272.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44334 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2010.12.19 11:43:48 Ever Confirmed|0 |1 --- Comment #14 from Jan Hubicka 2010-12-19 11:43:48 UTC --- I finally got into some time to test the various solutions. easiest is probably the following: Index: predict.c =================================================================== --- predict.c (revision 168047) +++ predict.c (working copy) @@ -126,7 +126,7 @@ maybe_hot_frequency_p (int freq) if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE && freq <= (ENTRY_BLOCK_PTR->frequency * 2 / 3)) return false; - if (freq < BB_FREQ_MAX / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION)) + if (freq < ENTRY_BLOCK_PTR->frequency / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION)) return false; return true; } It makes GCC to decide on cold basic blocks not based on the innermost loop nest but on the entry block frequency - so many conditoinals or EH renders BB cold but not the fact it is outside of very many BBs. Could you try if this solves the problem?