From patchwork Mon Jan 10 13:27:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 78147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B0E13B712A for ; Tue, 11 Jan 2011 00:26:45 +1100 (EST) Received: (qmail 29493 invoked by alias); 10 Jan 2011 13:26:44 -0000 Received: (qmail 29483 invoked by uid 22791); 10 Jan 2011 13:26:43 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga03.intel.com (HELO mga03.intel.com) (143.182.124.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Jan 2011 13:26:38 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 10 Jan 2011 05:26:37 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by azsmga001.ch.intel.com with ESMTP; 10 Jan 2011 05:26:37 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 96D67180954; Mon, 10 Jan 2011 05:27:21 -0800 (PST) Date: Mon, 10 Jan 2011 05:27:21 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PATCH: PR lto/46760: LTO bootstrap doesn't work with FDO Message-ID: <20110110132721.GA28794@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, I checked in this patch to fix LTO bootstrap work with FDO on Intel Core i7. It is preaproved in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760#c23 H.J. ---- Index: ChangeLog =================================================================== --- ChangeLog (revision 168630) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2011-01-10 H.J. Lu + + PR lto/46760 + * tree-inline.c (tree_can_inline_p): Check e->call_stmt before + calling gimple_call_set_cannot_inline. + 2011-01-10 Iain Sandoe * config/darwin-sections.def: Remove unused section. Index: tree-inline.c =================================================================== --- tree-inline.c (revision 168630) +++ tree-inline.c (working copy) @@ -5380,7 +5380,8 @@ tree_can_inline_p (struct cgraph_edge *e if (inline_forbidden_into_p (caller, callee)) { e->inline_failed = CIF_UNSPECIFIED; - gimple_call_set_cannot_inline (e->call_stmt, true); + if (e->call_stmt) + gimple_call_set_cannot_inline (e->call_stmt, true); return false; } @@ -5388,7 +5389,8 @@ tree_can_inline_p (struct cgraph_edge *e if (!targetm.target_option.can_inline_p (caller, callee)) { e->inline_failed = CIF_TARGET_OPTION_MISMATCH; - gimple_call_set_cannot_inline (e->call_stmt, true); + if (e->call_stmt) + gimple_call_set_cannot_inline (e->call_stmt, true); e->call_stmt_cannot_inline_p = true; return false; } @@ -5405,7 +5407,8 @@ tree_can_inline_p (struct cgraph_edge *e || !gimple_check_call_args (e->call_stmt))) { e->inline_failed = CIF_MISMATCHED_ARGUMENTS; - gimple_call_set_cannot_inline (e->call_stmt, true); + if (e->call_stmt) + gimple_call_set_cannot_inline (e->call_stmt, true); e->call_stmt_cannot_inline_p = true; return false; }