Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp653827pxy; Thu, 22 Apr 2021 10:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwOKdSz3N3caBFOnPwXSAdByaIHlNSuVTzaoDarW4Pqb/kp27xkvhOM7VEPBj0Rdulmbr1 X-Received: by 2002:a17:907:7745:: with SMTP id kx5mr4529672ejc.3.1619111688692; Thu, 22 Apr 2021 10:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619111688; cv=none; d=google.com; s=arc-20160816; b=ifs/WNLwHWe6nG5ehp5m26SEi9TGIy0yRES5jzn0C8xz6ZB+dbZnSLmheWtZxFk8rx 4fQgCmq6DK6Jk1draNe9jdDeexPliz22QreVxnxmxE+/Xz396rvmKwE9sGW9z532g2i5 9XuikaxRLyVrba3C41Rj73t0GHZjPvAJ+Pq5dXSverWhYGY0pwpdJGD7v2ffPdeVyoss KAB1+2+1orLmuOpkJQklgR109rBJlMaJmGx6+swFG+iVEUtY9z/bqKZbdc8VpI1aJP4x u0Mg4BTNHwzjxKyAjnO6w9dR1D8RBg+poz2MiW0/GDp2IvOIoM+AywqUqLO8d8Bww022 kH5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=sYufuVekNzW8ZH6er2uGuF79scVjKAcbee2kz5dS5VY=; b=cebAP18P2VrZkc1Tg57WyYzzPanU45k7EsBEWr8qn4MPTThvmxtderomxcw9eF6BhM SfXJ1iPvTc7ELAW1PJtEDdaDCBDTTJYngX0auE2vJIlz+XIx4KM6PVlnJIPZ8iJp7UhZ 4sRVOSdfITAh79n6sReUHyOXYihEik/9VEAUJC+Vc4XXR3zLcVWB7sKl+IRHM5ZNYW2D +IcPzolMiM/WvJDrwgY6elSAtDlWKZjqJTPcFz+0KZZ7P6EJD72uuo4K9OLfLflQY79V /RR5vuDLUEczaijJMlWpKGfm9WH51fSAlwPFgM+qXDddttBaZSFK98GfhkPj1LDrnDgU NIxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si2816348edh.472.2021.04.22.10.14.25; Thu, 22 Apr 2021 10:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238490AbhDVRLn (ORCPT + 99 others); Thu, 22 Apr 2021 13:11:43 -0400 Received: from gate.crashing.org ([63.228.1.57]:52091 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238182AbhDVRLk (ORCPT ); Thu, 22 Apr 2021 13:11:40 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 13MH8Ke3021449; Thu, 22 Apr 2021 12:08:21 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 13MH8Kx7021448; Thu, 22 Apr 2021 12:08:20 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 22 Apr 2021 12:08:20 -0500 From: Segher Boessenkool To: Peter Zijlstra Cc: David Malcolm , Ard Biesheuvel , linux-toolchains@vger.kernel.org, Linux Kernel Mailing List , Josh Poimboeuf , Jason Baron , "Steven Rostedt (VMware)" , yuanzhaoxiong@baidu.com Subject: Re: static_branch/jump_label vs branch merging Message-ID: <20210422170820.GB27473@gate.crashing.org> References: <3c062f70ffef2dcd48a661f7c8162fb8fbaf6869.camel@redhat.com> <0a9da587b0330bafdf612c3d51285e144b0b9e46.camel@redhat.com> <5a07bde1a9fa9a056a19637399b0635252ddb303.camel@redhat.com> <20210409213949.GA33256@worktop.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 01:48:39PM +0200, Peter Zijlstra wrote: > Can we please have a __pure__ attribute that is prescriptive and not a > hint the compiler is free to ignore for $raisins ? What does that mean? What actual semantics do you want it to have? The "pure" attribute means the compiler can assume this function does not have side effects. But in general (and in practice in many cases) there is no way the compiler can actually check that, if that is what you were asking for. And any such checking will depend on optimisation level and related flags, making that a no-go anyway. Segher