From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 64B643861847 for ; Wed, 4 Aug 2021 13:41:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 64B643861847 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 174DeSHT032290; Wed, 4 Aug 2021 08:40:28 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 174DeSP6032289; Wed, 4 Aug 2021 08:40:28 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 4 Aug 2021 08:40:28 -0500 From: Segher Boessenkool To: Richard Earnshaw Cc: Prathamesh Kulkarni , GCC Development Subject: Re: [RFC] Adding a new attribute to function param to mark it as constant Message-ID: <20210804134028.GG1583@gate.crashing.org> References: <20210803215538.GU1583@gate.crashing.org> <20210804101722.GD1583@gate.crashing.org> <20210804124619.GF1583@gate.crashing.org> <07900439-bc29-1f24-2522-4d2d79a86d4f@foss.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07900439-bc29-1f24-2522-4d2d79a86d4f@foss.arm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 13:41:31 -0000 On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote: > We don't want to have to resort to macros. Not least because at some > point we want to replace the content of arm_neon.h with a single #pragma > directive to remove all the parsing of the header that's needed. What's > more, if we had a suitable pragma we'd stand a fighting chance of being > able to extend support to other languages as well that don't use the > pre-processor, such as Fortran or Ada (not that that is on the cards > right now). So how do you want to handle constants-that-are-not-yet-constant, say before inlining? And how do you want to deal with those possibly not ever becoming constant, perhaps because you used a too low "n" in -On (but there are very many random other causes)? And, what *is* a constant, anyway? This is even more fuzzy if you consider those other languages as well. (Does skipping parsing of some trivial header save so much time? Huh!) Segher