From nobody Sat Jun 20 14:31:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gjH2Z0VXFz6jfL2; Sat, 20 Jun 2026 14:31:18 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4gjH2Y3y2jz43Xn; Sat, 20 Jun 2026 14:31:17 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 65KEV50u053234; Sat, 20 Jun 2026 17:31:09 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 65KEV50u053234 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 65KEV5xJ053233; Sat, 20 Jun 2026 17:31:05 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Sat, 20 Jun 2026 17:31:05 +0300 From: Konstantin Belousov To: Faraz Vahedi Cc: Warner Losh , alc@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 9d87c1aac4a8 - main - libc: Add missing kill_dependency macro Message-ID: References: <6a35ddd4.24ba1.2ad9343d@gitrepo.freebsd.org> <9A21692F-0B53-4303-85A8-57784BFAF8DE@kfv.io> <33E8BFC4-EA46-41A7-B54F-1AADD3C19D9E@kfv.io> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <33E8BFC4-EA46-41A7-B54F-1AADD3C19D9E@kfv.io> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4gjH2Y3y2jz43Xn X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Sat, Jun 20, 2026 at 05:29:52PM +0330, Faraz Vahedi wrote: > Hey, > > I took another look and dug a bit deeper to make sure whether we > should adopt GCC’s form here, and I still think we should stick with > the current one. > > First, although I still need to investigate further, I doubt it adds any > optimisation benefits, nor would omitting it incur a penalty. No, it is not about benefits, my note is that the gcc implementation might disable some optimizations that are important for gcc case. > > More importantly, what we currently have fully conforms to the > §7.17.3.1 and is therefore in its most portable form. There is also > ongoing work (e.g. N3607) to retire `memory_order_consume` and > obsolete `kill_dependency`, with the proposed wording being that > the macro “has no other effect than its result”, which is essentially > just `(y)`, right? So presumably Clang's own `` uses > `(y)` for the same sort of reasons. Yes, this is what I referred to as 'no clear semantic' in my initial mail. What consitues a dependency chain, is up to the compiler. If clang does not have the concept (?) internalized, then the current implementation is fine. But if gcc gives some subtle meaning to consume, its implementation of assigning to the temporal might have some reasons. > > However, I’m happy to discuss it further, and please do correct me > if you have data suggesting otherwise. In the meantime, I’ll do a bit > more research and will keep you posted if I find anything else. > > Cheers, > Faraz >