From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35934 invoked by alias); 5 Dec 2018 23:16:44 -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 35921 invoked by uid 89); 5 Dec 2018 23:16:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=H*c:MHil, H*c:HpplH, zhao, Zhao X-HELO: userp2120.oracle.com Received: from userp2120.oracle.com (HELO userp2120.oracle.com) (156.151.31.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Dec 2018 23:16:42 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB5NEHdI114717; Wed, 5 Dec 2018 23:16:40 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2p3jxrn8qb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Dec 2018 23:16:39 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wB5NGcMF030747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Dec 2018 23:16:38 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB5NGbSk017135; Wed, 5 Dec 2018 23:16:38 GMT Received: from dhcp-10-159-132-128.vpn.oracle.com (/10.159.132.128) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Dec 2018 15:16:37 -0800 From: Qing Zhao Message-Id: <08E2AFA4-EBEF-4DA3-8DB1-B5603D43BAEC@oracle.com> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Question on Disable no throw for -flive-patching master option. Date: Wed, 05 Dec 2018 23:16:00 -0000 In-Reply-To: Cc: =?utf-8?Q?Martin_Li=C5=A1ka?= , gcc Patches To: Jan Hubicka References: <8F7AEFF2-5DCE-49B6-BC9E-34FC0DEF2A55@oracle.com> <568496ae-!24cf-7453-57db-a2188d5d11c2@suse.cz> <49B97110-C7FD-4569-AE26-1B37951D802B@oracle.com> <30e99713-0a96-3acb-ea5f-8f0996be69a6@suse.cz> <5A3304F6-2084-44BA-86CB-88A657AAF741@oracle.com> <25de1f37-40b1-1834-78cc-13f89215906d@suse.cz> <06EEEEBB-40EC-47DE-BB30-22784E3E28AF@oracle.com> <20181128155203.rusncos2kiieyqgk@kam.mff.cuni.cz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00324.txt.bz2 Hi, Honza, I have one question relate to whether to disable nothrow for -flive-patchin= g as following: actually, there are two passes here: 1. local nothrow pass: in this pass, nothrow attribute is set locally afte= r analyzing every stmt of the function body:=20 unsigned int pass_nothrow::execute (function *) { struct cgraph_node *node; basic_block this_block; =E2=80=A6 } 2. nothrow propagation pass: (it=E2=80=99s included in the ipa_pure_const = pass as following, propagate the nothrow=20 attribute along callcgraph) unsigned int pass_ipa_pure_const:: execute (function *) { bool remove_p; /* Nothrow makes more function to not lead to return and improve later analysis. */ propagate_nothrow (); propagate_malloc (); remove_p =3D propagate_pure_const (); delete funct_state_summaries; return remove_p ? TODO_remove_functions : 0; } the nothrow propagation pass is included in ipa_pure_const pass, and is gua= rded by flag_ipa_pure_const,=20 this flag_ipa_pure_const is disabled when -flive-patching is ON. So, my question is: shall we disable local nothrow pass as well when -flive-patching is ON? my understanding is: we should.=20 the reason is: the local nothrow pass is setting the nothrow attribute fo= r the current routine based on its body, and this =E2=80=9Cnothrow=E2=80=9D attribute will be used when gene= rating EH code around callsite from the caller of the routine. so the nothrow attribute might impact other routines than t= he current routine. as a result, we should disable this pass? what=E2=80=99s your opinion on this? thanks. Qing > On Nov 28, 2018, at 2:24 PM, Qing Zhao wrote: >>=20 >> Shall we also disable nothrow or we will worry about C++ only ter? >=20 > This is also mainly for C++ applications, so currently should not be a pr= oblem. > But I can add a separate simple patch to add another flag to control noth= row propagation and disable it when -flive-patching is ON. >=20 >>=20 >> Patch is OK, >=20 > thanks for the review. >=20 > I will commit the patch very soon. >=20 > Qing >> thanks! >> Honza