From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7F9973858D3C for ; Thu, 5 May 2022 18:11:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F9973858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass 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-out2.suse.de (Postfix) with ESMTPS id 62E611F8D4; Thu, 5 May 2022 18:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651774296; 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=2waFaJcivPmCU7bmvDxsjwFghNefL02z0jpAC5FfY3A=; b=yNIEYtPV4aZP/z46CiLuZkwuOsIRz8gHujy1FiDF7LdRUfslfAeL+E9K1utJscJw2lwqOz zH9SRmeSKyp4PEI9IO3Kv/IQ5KaJPf9Jolg3dw9VQZx5rmmk0MkeKUGwoqdsZZexdpcRpj 9fdP+wnRAfNwBZk8uYDuysgfcq8BkpM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651774296; 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=2waFaJcivPmCU7bmvDxsjwFghNefL02z0jpAC5FfY3A=; b=XuSZgwlwEWlWv0uYh/N/DgsC1yIK5bfd9m9ZrN1Efgr4SHjhlisVtVs62UqEtoR6BqwB0U 89hcGq1Zc0PrzbCw== 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 4BA3413B11; Thu, 5 May 2022 18:11:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id BqFED1gTdGIuDQAAMHmgww (envelope-from ); Thu, 05 May 2022 18:11:36 +0000 Message-ID: Date: Thu, 5 May 2022 20:11:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] Come up with {,UN}LIKELY macros. Content-Language: en-US To: Segher Boessenkool , Marek Polacek Cc: gcc-patches@gcc.gnu.org References: <542d7d88-bf16-3fd7-7bff-f74147d76e67@suse.cz> <20220505153106.GD25951@gate.crashing.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <20220505153106.GD25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 18:11:40 -0000 On 5/5/22 17:31, Segher Boessenkool wrote: > On Thu, May 05, 2022 at 09:06:45AM -0400, Marek Polacek via Gcc-patches wrote: >> On Thu, May 05, 2022 at 02:31:05PM +0200, Martin Liška wrote: >>> Some parts of the compiler already define: >>> #define likely(cond) __builtin_expect ((cond), 1) >>> >>> So the patch should unify it. > >> That's funny, yesterday I added another one: cp/parser.cc:cp_parser_init_declarator >> which is not replaced in this patch. >> >> I would've preferred the name gcc_{,un}likely but I don't want to start >> a long bikeshedding... > > GCC_LIKELY is fine with me. A bare LIKELY isn't though. We have much > more common macros having LIKELY in the name already (PROB_*LIKELY, > CLASS_LIKELY_SPILLED, the various IPA things, loop versioning, etc.), > but also we have LIKELY and UNLIKELY as function arguments in various > places. Well, out of the 2 suggested names (GCC_LIKELY and gcc_likely), I prefer GCC_LIKELY. You are right that LIKELY may confuse various people. Is the community fine with the suggested name? Martin > > > Segher