From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 8D3B43858D37 for ; Wed, 5 Oct 2022 17:36:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D3B43858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 19100219CD; Wed, 5 Oct 2022 17:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664991392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tOYVGj4MPTivxjjW7FtTUTuNq5fionUFlMj4bEsDZ8Q=; b=BbdbJ2/g/aSldXDvPbSauAonW+dKW9YwtlrK+AqdKz+Ky0Aqm9LpRMnCvApO0jBz5zEmSx aPIgE/MZ7tlAf2KbyIQ5KWvoDd9chtuzvDSe0bjkTpK92uEFvDVoE6d3VwGi7eO+PAJ3FL LA99DrBdzrGdExkiD/mX1seVdd04roU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664991392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tOYVGj4MPTivxjjW7FtTUTuNq5fionUFlMj4bEsDZ8Q=; b=AIal+H4x7zTVyvXCv0sR4FD022E0Dn850p7ghI3DEUYYuogPkK7yUU8vxcqmQfED/I4ssL MH0667NWWUTP71DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F2BE413ABD; Wed, 5 Oct 2022 17:36:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id y8tLOp/APWPueAAAMHmgww (envelope-from ); Wed, 05 Oct 2022 17:36:31 +0000 Message-ID: <137fde8c-7ade-ecc0-96f2-9ec828b4745e@suse.cz> Date: Wed, 5 Oct 2022 19:36:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] IPA: support -flto + -flive-patching=inline-clone Content-Language: en-US To: Qing Zhao Cc: "gcc-patches@gcc.gnu.org" , Jan Hubicka References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/5/22 16:50, Qing Zhao wrote: > I have two questions on this: Hello. > > 1. What’s the motivation to enable -flive-patching with -flto? Is there any application that will try -flive-patching with -flto now? We're planning supporting GCC LTO Linux kernel support, so that's one motivation. And the second one is a possible use in user-space livepatching. Note majority of modern distros default to -flto (openSUSE, Fedora, Debian, Ubuntu, ...). > > 2. Why only enable -flive-patching=inline-clone with -flto? Because the inline-only-static level (which you added/requested) would have to properly block inter-procedural inlining that happens in LTO (can_inline_edge_by_limits_p) and I'm not sure it would be properly blocked. So, feel free to extend my patch if you want? Martin > > thanks.