From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id DE7533858C56 for ; Thu, 4 Apr 2024 13:56:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE7533858C56 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE7533858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712239004; cv=none; b=pvS1u+lqxmxTw5as0xNYNhoaCKu62WOi5VJzuSQ295lgsKw9ZbjB5ef7+qO/SppcoOI2GnsRyDmvG+UGM1So9RF84EWtxUVd1zxY9cRYvyFoI0pVlbsB/e7HbA1qAKKATHmg0Qk20Q3oEV38IgtJJQ3bFbhFsQeqIzv87W6H0fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712239004; c=relaxed/simple; bh=qqvahFNGvQV2QiT/WswWkcviCTK6LQiuJFfZGSDKd+M=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=k0KfLyO7rZ6Fb8PK/9cfwuW1A2lVNxNX6wccYm3Enk7TQpJY1UY7VAWK/doYXhg4gNGUADZVU9TukX0uKMh0PoF4vK4Qx9fMqsIg0WhrU6AvK3m7p3qT8zDJ1iH0Tgn6i0VOB/sHN0mTTNCAkGWkrRlpzI7HVBRRbT/ZyZ9w7cM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 62F86286170; Thu, 4 Apr 2024 15:56:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1712239001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5h7cfPeETmTNNknvp/MHvQK+KRmfvsaCmpOmwDvJkDI=; b=EXQV0Hsm67K0ca6ZmFCq5rWicH0MkmSTuKOPNLe7hC/FNit9g/8Kp0pHwN2NXM2gYEBTya Np+xPCdTOfWe1GwWy+etPCNqUzc6Q5488M0g/xaqedzty7dfKBdVswyLW2P3bYyOuy4rGD 2ZS4uW/z947UI10/JIffUW3lAp40MDs= Date: Thu, 4 Apr 2024 15:56:41 +0200 From: Jan Hubicka To: =?utf-8?Q?J=C3=B8rgen?= Kvalsvik Cc: gcc-patches@gcc.gnu.org, richard.guenther@gmail.com Subject: Re: [PATCH v10 1/2] Add condition coverage (MC/DC) Message-ID: References: <20240223111800.1209438-1-j@lambda.is> <7033a2f7-42de-4bb3-a99a-28a35995c4a2@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7033a2f7-42de-4bb3-a99a-28a35995c4a2@lambda.is> X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,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: > > > diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc > > > index dc120e6da5a..9502a21c741 100644 > > > --- a/gcc/ipa-inline.cc > > > +++ b/gcc/ipa-inline.cc > > > @@ -682,7 +682,7 @@ can_early_inline_edge_p (struct cgraph_edge *e) > > > } > > > gcc_assert (gimple_in_ssa_p (DECL_STRUCT_FUNCTION (e->caller->decl)) > > > && gimple_in_ssa_p (DECL_STRUCT_FUNCTION (callee->decl))); > > > - if (profile_arc_flag > > > + if ((profile_arc_flag || condition_coverage_flag) > > > && ((lookup_attribute ("no_profile_instrument_function", > > > DECL_ATTRIBUTES (caller->decl)) == NULL_TREE) > > > != (lookup_attribute ("no_profile_instrument_function", > > > > tree-inline should also copy the cond tags, since always_inline > > functions are inlined even at -O0. But I think this can be done > > incrementally. > > > > Patch is OK. > > Thanks a lot and sorry for taking so long on this one. > > Honza > > I guess you mean that since tree-inlining happen after gimplification (does > it?) that the basic condition -> condition expression association should > also fold in the now-inlined conditions? Yes, if you declare function always_inline the order of event is as follows 1) gimplification of both functions 2) ssa constructions 3) early inlining where inline happens 4) profile instrumentation. Honza > > Thanks for the review - I'll do a final test run and install the patch.