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 73FD2384D173; Thu, 20 Oct 2022 17:27:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 73FD2384D173 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass 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 29KHQ1Jd013304; Thu, 20 Oct 2022 12:26:01 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 29KHPxK2013301; Thu, 20 Oct 2022 12:25:59 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 20 Oct 2022 12:25:58 -0500 From: Segher Boessenkool To: "Jiang, Haochen" Cc: Andrew Pinski , "gcc-patches@gcc.gnu.org" , "aoliva@gcc.gnu.org" , "richard.sandiford@arm.com" , "uweigand@de.ibm.com" , "linkw@gcc.gnu.org" , "gnu@amylaar.uk" , "dje.gcc@gmail.com" , "olegendo@gcc.gnu.org" , "claziss@synopsys.com" , "mfortune@gmail.com" , "davem@redhat.com" , "dave.anglin@bell.net" , "hubicka@ucw.cz" , "richard.earnshaw@arm.com" , "rguenther@suse.de" , "marcus.shawcroft@arm.com" , "ramana.radhakrishnan@arm.com" , "Liu, Hongtao" Subject: Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM Message-ID: <20221020172558.GS25951@gate.crashing.org> References: <20221014083406.8406-1-haochen.jiang@intel.com> <20221014083406.8406-2-haochen.jiang@intel.com> <20221019211421.GQ25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Oct 20, 2022 at 01:44:15AM +0000, Jiang, Haochen wrote: > Maybe the testcase change cause some misunderstanding and concern. > > Actually, the patch did not disrupt the previous builtins, as the builtin_prefetch > uses vargs. I set the default value of the new parameter as data prefetch, which > means that if we are not using the fourth parameter, just like how we use > prefetch previously, it is still what it is. I still think it is a mistake to have one builtin do two very distinct operations, only very superficially related. Instruction fetch and data demand loads are almosty entirely unrelated, and so is the prefetch machinery for them, on all machines I am familiar with. Which makes sense anyway, since instruction prefetch and data prefetch have completely different performance characteristics and considerations. Maybe if you start with the mistake of having unified L1 caches it seems natural, but thankfully most machines do not do that. Segher