From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id 294A23858D37 for ; Tue, 27 Dec 2022 18:31:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 294A23858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd32.google.com with SMTP id p6so7241520iod.13 for ; Tue, 27 Dec 2022 10:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bJqXF8eoZJge3zY7+FSxgBS2CXjrRVpYLjAsgUvZVPQ=; b=Eo3WmS3YfhNUK7KE1hoKK859qvNY23cvsYdUwQbnYNf0aa3Sh0YH6D1gBx0N5G6+gN RgGHrCY+xE/Q4oKRKJOcsSc2vafmp1IJReZ9OYeObXFsA3bG9MA6Pdeyno3QuyJGktP5 faMljLrlN0qtcuSsaShvzNF0LfaFFZQZEjdxEJbUXqfQzCKwiFpMANGLP4+EwMW9mD40 w6kQ0epbmTr1POo28BvSJg+VTLITaVEL7IQQTHapuZtMCxUm4BfeQv4iZykT6oBingpg EeDzC1P9B4TmJ8vF1DUu/VDC+QEmiJ5pGWlAJq3pW8i3f2pVwZ/PXDsQ9ju7H0KB8AX6 Z+UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bJqXF8eoZJge3zY7+FSxgBS2CXjrRVpYLjAsgUvZVPQ=; b=DbMsBhxDOQ+2pOqYKctm1Zlxe/l0xzpVcKMx1epFimO7A6jTl4fvZvxZxJUbNW2o8N VyqlKfjHPr4fANbs9GzqFf0E4i+J0J5yuEsstDyibM0ouf8FaYFXAvMcwHBTT8iD8P1H mFvGbcCsSNIPsRFWCkcCWD44s4D8wfsG1uu79crKluiubv9dMATPAzAOtbivfwuHWxRL 9WpDlanndPlOR+40xWF4JXPBSwfx5MMDVPc6OMPht8N+AN0OZH9G5UfV2LCXW/mZGtiU ExgEoc2X+pUaGdQMI5/Jp6Ta1X0UtCfH2I/NCGWB9QBxWUNjQm19U1GyPTBQhkxfL0/X U9Ww== X-Gm-Message-State: AFqh2kodBkeCN6k/NbuSxZi7BdGhK7G9fnPmU4sRrho52KlbAgo0uDYU UJwTYgO5qX/UJeCnnCD1aEI= X-Google-Smtp-Source: AMrXdXv7e9KWmrTO4FJ73K+hhkmx6yZ+kMn4kAuFa5zLb1yMjzwMYLuX3fTT5IDOi3PBSwGWfIUTug== X-Received: by 2002:a6b:fa18:0:b0:6e2:d84f:ff27 with SMTP id p24-20020a6bfa18000000b006e2d84fff27mr14726606ioh.15.1672165906356; Tue, 27 Dec 2022 10:31:46 -0800 (PST) Received: from [172.31.1.18] (65-130-81-249.slkc.qwest.net. [65.130.81.249]) by smtp.gmail.com with ESMTPSA id cl15-20020a0566383d0f00b0038aa3699c9fsm4390251jab.95.2022.12.27.10.31.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Dec 2022 10:31:45 -0800 (PST) Message-ID: <0cca02a3-bb7e-3645-d98f-b6c04457ad07@gmail.com> Date: Tue, 27 Dec 2022 11:31:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] RISC-V: Support VSETVL PASS for RVV support Content-Language: en-US To: =?UTF-8?B?6ZKf5bGF5ZOy?= , gcc-patches Cc: "kito.cheng" , palmer References: <20221214071345.153278-1-juzhe.zhong@rivai.ai> <77c96a76-34e1-5394-d7ac-31de790dd007@gmail.com> <4DFC9DE6B54EBF58+20221220065905807562113@rivai.ai> From: Jeff Law In-Reply-To: <4DFC9DE6B54EBF58+20221220065905807562113@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 12/19/22 15:59, 钟居哲 wrote: > >> ISTM that if you want to run before sched2, then >>> you'd need to introduce dependencies between the vsetvl instrutions and >>> the vector instructions that utilize those settings? > > Yes, I want to run before sched2 so that we could have the chance to do the > instruction scheduling before sched2. I already introduce dependencies in > vector instructions so that it won't produce any issues. Ah good that you're adding the necessary dependencies. We'd been talking a bit about this internally. The hope is that on an OOO machine the vsetvl will be able to issue/execute relatively early, but on an in-order machine the ability to schedule the vsetvl could become significantly more important. > > >> It'd probably be better to move this into rtl.cc with a prototype in >>>rtl.h rather than have duplicate definitions in gcse.c and the RISC-V >>>backend.  I'm not even entirely sure why we really need it here. > Maybe we do that when GCC14 is open? If we're just making a routine external that previously had static scope then we can still do that IMHO. Such a change won't affect code generation so it should be extremely safe. I'm happy to engage with Richi and Jakub to get their sign-off on such a change. Jeff