Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2282364rdb; Mon, 5 Feb 2024 01:17:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEd4+dsMfhWTI11BqbMbQcSHm9QdSejl8s8L8nkh+jT8I1dZcSlf8mzmxWBIft7fLN2avpa X-Received: by 2002:a17:906:b2d7:b0:a37:e872:766f with SMTP id cf23-20020a170906b2d700b00a37e872766fmr381758ejb.67.1707124659521; Mon, 05 Feb 2024 01:17:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707124659; cv=pass; d=google.com; s=arc-20160816; b=pWFhor76AjxG2s4+NElFNkuxZJa8IcBfUFASwPWbyR/raeFVjkijDzu9XN4qurhc4Q xPHwNoXQQLYg3lqF27BQv2YSwrJ4939EWixnH+ycljZP/1sGyNHs+/LyFHv7Eiz3FGMX loBdXruCgGHaOQsTl4cz8Xp1/xsUXoYN0raouyEaqi+Nsx2Ezknfqe1UKDIWPA9tvniX JHTsrbS7GaX5VDifghrB5zvju1+4s2/W5xiQZAmVVthcPCTgUJ+74aahe03ODs0fQvoG szxIoWCFc4ykVy52L3SQl75fLZeCyFUi/f5tk5DWLUWSMJ9sMuXGO8p2lPGoqfVBX2MB 89Zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence; bh=rU3n7CJ8LR2Ka0hr51hd9lp4PmyuHjFJfmGGeQpcndM=; fh=ANSe4p5Z8OM2r30E8c6cgYf52gSKT3IDWFQoc9LDKlo=; b=lulX8fR3y7KDdLCmCyPoUNQSqLk7Og323dl1dOe5IrrywletUbea8boydVyQbz8+B6 IvhEjv3cASCBlm8HygiyY8HkdhPJs9htREtvufYxOXCmT08I8eO8jjQI7x/jbVIxL5b0 oE7u1Nj1/Aj9PMQzbrxTvbmTkXdXkehc9az+IvRJ14JSZ04w+lDoFIKZnvr9YmzhA+ZL 1WF8H8BXinhA0SbOl4PJzA5roDDSiYbB+3l4dGx3n8KvMHymKyYkKNOF3vtXFEg0+z7E ZivXISLg+KgPEQ+dzshHBy0WX34fkGHX7enWHmoexwxKvLmysCO8lVDzRAsYjp5OiCLP qj6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr X-Forwarded-Encrypted: i=1; AJvYcCVXMZLTMVK6SuO4fnkNhiRPfbfO+fQ8rqh75vhGwIKFWsc4fO5uzxTQwfnZOanzfy5YS6uX+cImuQjx0E3cBmq9gIwkzRK9o8smJ+f8GQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i11-20020a170906698b00b00a35c134fbe3si3622986ejr.381.2024.02.05.01.17.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 01:17:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52278-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52278-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 445ED1F2151F for ; Mon, 5 Feb 2024 09:17:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DAC712B9C; Mon, 5 Feb 2024 09:17:22 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 313FF12B7B for ; Mon, 5 Feb 2024 09:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707124641; cv=none; b=nkadM4UeOyFh1i6sf6l7grilZbeJv1LrLyo1ILO6oe6PhS9V+xB4Ai6GJY4j9Vr2mrXtkT2FdisGcXQJKum8MKtoKe/se/3NQ4wqjdmCjVCt+FzuF8Rs1l7jWHiOS9MSvBreBCRBm9WslgB+xU99YA4nG3WCXUo6GH1e1A2Q52w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707124641; c=relaxed/simple; bh=96MPBiS40e0x9Vw86i9UrFnPx8o4zrAU2LTLF+KiPMw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=saQKrueGipubS7cdQr1ulbWYVCiPJPaS+tl3/NdNnIkeCdkDnNd7/+OW1o8a4VtAOnWvuQ5bgcOR7A1QSxZvjvU4EtXByPFj39xPy1+y8AZ1N+J8K1UjPRc0jsw1J1Jjo1UVjv7KJCZjZAigbQvkLiyjMTCQHq53qFXpEVvYQM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-295f9a4a656so3440711a91.1 for ; Mon, 05 Feb 2024 01:17:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707124639; x=1707729439; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rU3n7CJ8LR2Ka0hr51hd9lp4PmyuHjFJfmGGeQpcndM=; b=t/Gftyds8xZOAyDMRf0SEEphs0QU81nbGmkmcm5VNiM83yX+b8xfW3BOR2wM1sZhYU rwUprd7KIHms1Jd7D06SZYTnmHvGHX2sgtorIgGAjiSUmsRNu6pImy7NpC4yDmh9kt3K xR/iLnhQ99/GQ6omPyNUwjfJSrF0JXubNDaoaD7Cdm0+b9Loe3HZUwpJzDSbhrwvWelA AvliP2/cQPs/DIE2XvwY5113b6V+Zrc2pgIN99jWx8qDB4oZDjBcNReusQiiRQVE6mPR IytkKqVcY+VdqGy1QIOgHMx/Fcp5QiPO5ChbElr7tRnRjgK0NueIJgFTHrnVb9kZJ7wh SPVQ== X-Gm-Message-State: AOJu0YygnMRjUmIA7uALPjV5dGYZV4olB+XWvTDBDCgi88ZtG/az0XJ2 0MbgPyhMXEMvBn5qCRLIA8XVRVK5qCHhDE9hOjzyYkG1HKtAIPL1hNWVN3XiPWWyfCNxcyYaFjh mlwO0JCxebE5E5f6ebwwoDgIjcqQ= X-Received: by 2002:a17:90a:3006:b0:296:2035:a3c2 with SMTP id g6-20020a17090a300600b002962035a3c2mr10729751pjb.36.1707124639396; Mon, 05 Feb 2024 01:17:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20221111081316.30373-1-mailhol.vincent@wanadoo.fr> <20240128050449.1332798-1-mailhol.vincent@wanadoo.fr> <20240128050449.1332798-3-mailhol.vincent@wanadoo.fr> <9d9be9dbe92f43d2a95d11d6b2f434c1@AcuMS.aculab.com> <77831c6f-7fc9-c42d-b29b-c3b2f3f5e687@linux-m68k.org> <002675b0-6976-9efa-6bc5-b8bad287a1d2@linux-m68k.org> In-Reply-To: <002675b0-6976-9efa-6bc5-b8bad287a1d2@linux-m68k.org> From: Vincent MAILHOL Date: Mon, 5 Feb 2024 18:17:07 +0900 Message-ID: Subject: Re: [PATCH v4 2/5] m68k/bitops: use __builtin_{clz,ctzl,ffs} to evaluate constant expressions To: Finn Thain Cc: David Laight , Andrew Morton , "linux-kernel@vger.kernel.org" , Yury Norov , Nick Desaulniers , Douglas Anderson , Kees Cook , Petr Mladek , Randy Dunlap , Zhaoyang Huang , Geert Uytterhoeven , Marco Elver , Brian Cain , Geert Uytterhoeven , Matthew Wilcox , "Paul E . McKenney" , "linux-m68k@lists.linux-m68k.org" Content-Type: text/plain; charset="UTF-8" On Mon. 5 Feb. 2024 at 08:13, Finn Thain wrote: > On Sun, 4 Feb 2024, Vincent MAILHOL wrote: (...) > Let's see if I understand. > > You are proposing that the kernel source carry an unquantified > optimization, with inherent complexity and maintenance costs, just for the > benefit of users who choose a compiler that doesn't work as well as the > standard compiler. Is that it? My proposal is quantified, c.f. my commit message: On an allyesconfig, with GCC 13.2.1, it saves roughly 8 KB. "Saving roughly 8kb" is a quantification. And clang use in the kernel is standardized: https://www.kernel.org/doc/html/latest/process/changes.html#current-minimal-requirements GCC may be predominant, but, although optional, clang v11+ is officially supported, and thus my patches should not neglect it. This is why I am asking whether or not clang support is important or not for m68k. If you tell me it is not, then fine, I will remove all the asm (by the way, the patch is already ready). But if there are even a few users who care about clang for m68k, then I do not think we should penalize them and I would not sign-off a change which negatively impacts some users. The linux-m68k mailing list should know better than me if people care about clang support. So let me reiterate the question from my previous message: is clang support important for you? I would like a formal acknowledgement from the linux-m68k mailing list before sending a patch that may negatively impact some users. Thank you. > At some point in the future when clang comes up to scrach with gcc and the > builtin reaches parity with the asm, I wonder if you will then remove both > your optimization and the asm, to eliminate the afore-mentioned complexity > and maintenance costs. Is there an incentive for that work? I will not follow up the evolution of clang support for m68k builtins. The goal of this series is to add a test to assert that all architectures correctly do the constant folding on the bit find operations (fifth patch of this series). It happens that m68k and hexagon architectures are failing that test, so I am fixing this as a one shot. After this series, I have no plan to do further work on m68k and hexagon architectures. Thank you for your understanding. Yours sincerely, Vincent Mailhol