From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13145 invoked by alias); 6 Dec 2013 16:25:51 -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 13107 invoked by uid 48); 6 Dec 2013 16:25:47 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/58721] [4.9 Regression] The subroutine perdida is no longer inlined in fatigue.f90 Date: Fri, 06 Dec 2013 16:25: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: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 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: 2013-12/txt/msg00513.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58721 --- Comment #10 from Jan Hubicka --- OK, seems that the problem is with Fortran generating internally __builtin_expect to control various construct. I would make a lot more sense to use GIMPLE_PREDICT for those cases. With GIMPLE_PREDICT one can have more fine grained control over the hint and handle it as separate predicter. I wonder if some Fortran maintainer can look into this and update the lowering? c/c-typeck.c: add_stmt (build_predict_expr (PRED_CONTINUE, NOT_TAKEN)); cp/cp-gimplify.c: tree pred = build_predict_expr (PRED_CONTINUE, NOT_TAKEN); are examples how these are used. Unlike builtin_expect you do not add it into the expression, but you drop it on the unlikely code path. Honza