From patchwork Fri Mar 8 11:23:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1053444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-497560-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="uqbc9xFX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44G4rm6Yycz9s70 for ; Fri, 8 Mar 2019 22:24:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=sAXd8gl8mgdXFSPrHWVQvDvbenX64BjylQjo3VSiMnxoa83HDd 1vfp0/2hIZDvkpsp5a1Q+ecBcjgR11Kj2b2FrOBvvOl1eV3NvK3fo0+qQm9HXIsd 9Wwl+z9CSSWgedCcqLfvI3l0aJycHNMRCRelGa9qVZHk+cUmsTearrIsA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=L2yHZJdHt+9CAMrqbSOgllXj00c=; b=uqbc9xFXC2RThSmmRu/I FJ//UMSMTRbVWEg/fhg2Q/WThvAYtnErmrFbcHik6cQkOFaq+pTlx9af97ZvBfz5 BIv+bbhIlcvQyShDTU+b8WnNGuTJCgxzJwx+B3lTzb3VKruN9GBCeDhkLXl0pQJH xREetaOSiXhCx2Y7tucJgY4= Received: (qmail 107803 invoked by alias); 8 Mar 2019 11:23:26 -0000 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 Received: (qmail 107752 invoked by uid 89); 8 Mar 2019 11:23:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=Ready, IPA X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Mar 2019 11:23:23 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5C29FB009; Fri, 8 Mar 2019 11:23:21 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Restrict IPA split (PR go/63560). To: gcc-patches@gcc.gnu.org Cc: Jan Hubicka Message-ID: Date: Fri, 8 Mar 2019 12:23:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 X-IsSubscribed: yes Hi. This is quite old hunk that Honza forgot to install: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63560#c1 Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Or should I wait for next stage1? Thanks, Martin gcc/ChangeLog: 2019-03-08 Jan Hubicka PR go/63560 * ipa-split.c (execute_split_functions): Do not split 'noinline' or 'section' function. --- gcc/ipa-split.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index cfd03abb07d..5eaf8257f98 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -104,6 +104,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "ipa-fnsummary.h" #include "cfgloop.h" +#include "attribs.h" /* Per basic block info. */ @@ -1751,6 +1752,20 @@ execute_split_functions (void) return 0; } + if (lookup_attribute ("noinline", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is noinline.\n"); + return 0; + } + if (lookup_attribute ("section", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is in user defined " + "section.\n"); + return 0; + } + /* We enforce splitting after loop headers when profile info is not available. */ if (profile_status_for_fn (cfun) != PROFILE_READ)