From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33027 invoked by alias); 27 Sep 2018 08:58:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 33014 invoked by uid 89); 27 Sep 2018 08:58:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=Hx-languages-length:1501 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Sep 2018 08:58:31 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id C27665435C4; Thu, 27 Sep 2018 10:58:29 +0200 (CEST) Date: Thu, 27 Sep 2018 09:47:00 -0000 From: Jan Hubicka To: Qing Zhao Cc: Jason Merrill , Jeff Law , Richard Biener , gcc Patches , Jakub Jelinek , Alexander Monakov , andrew Pinski , martin Sebor Subject: Re: [PATCH][Middle-end][Version 4]Add a new option to control inlining only on static functions Message-ID: <20180927085829.GJ61973@kam.mff.cuni.cz> References: <5263e463-96d1-7fc5-ddff-26efa82df25f@redhat.com> <20180926150649.GD61973@kam.mff.cuni.cz> <20180926171642.GG61973@kam.mff.cuni.cz> <131EB12C-DC35-4B3C-9F89-40EBA5317261@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <131EB12C-DC35-4B3C-9F89-40EBA5317261@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2018-09/txt/msg01637.txt.bz2 > > Okay, I see. > > > > > If you make this to be INTERPOSABLE (which means it can be replaced by different > > implementation by linker and that is probably what we want for live patching) > > then also inliner, ipa-sra and other optimization will give up on these. > > do you suggest that to set the global function as AVAIL_INTERPOSABLE when -finline-only-static > is present? then we should avoid all issues? It seems to be reasonable direction I think, because it is what really happens (well AVAIL_INTERPOSABLE still does not assume that the interposition will happen at runtime, but it is an approximation and we may introduce something like AVAIL_RUNTIME_INTERPOSABLE if there is need for better difference). I wonder if -finline-only-static is good name for the flag though, because it does a lot more than that. Maybe something like -flive-patching? How much is this all tied to one particular implementation of the feature? Honza > > Qing > > > > Honza > >> > >> > >>> For example comdat that was cloned by IPA-SRA. See can_be_local_p and > >>> comdat_can_be_unshared_p predicates. Similar problem happens to clones created > >>> by ipa-cp. > >>> > >>> I guess we want to disable localization and cloning in this case as well. > >>> I wonder what else. > >> > >> Yes, I think we should make -finline-only-static incompatible with cloning and tree-sra too. > >> > >> Qing > >>> > >>> Honza >