From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 9CD513858407 for ; Thu, 21 Dec 2023 06:59:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CD513858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9CD513858407 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703141962; cv=none; b=QcxxPu6CVt0sLNgAHTVj7r4k+KPb8quaQWTWf4063/GXMac3T2R/AqOVEXfzx0w31HaNFaOTyClNGgj9ZbWLDLFGJPVuNo5wJDqO+oRkSMtO5xgJ05PP2eSFQBKgEUPZvpG60H7YEM9YIIVwmOjxvgm2hW1oiF3vdcEVsHz4DLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703141962; c=relaxed/simple; bh=buSgE3priQNd5cW8DPfWsfdhlzNQyRvn4MIsB/uyvdg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=jxPTEwKYas2PEhECOaaA8NI+oCVe3HLS7y0CEWSzcX5lMDyH6KVInukX7X2F/KPo5oGLt40yD4GILzzeV/plH6nyN11xOuloJ0FyOfP/bIYpwBhnunwcwYnleHt3jL5rS/EQ78DvHpsLKrx3wUbGu0D101s2uuc8ASj7UrxiavQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7b7f9fdc14dso25282339f.0 for ; Wed, 20 Dec 2023 22:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703141961; x=1703746761; darn=gcc.gnu.org; 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=qbIqxGfJOEDLzvXJ7s1G/kNvsieJHgfRNco3QE6a50Q=; b=X0DUHwICKKTHKBZy0oh1awaXkCJMpatw1rgWMbRxxcPKdnjIMUKJY3k4cQtrVoTnrI sdu9G96OQytnRsYQlrDhiVYDWEY4SwMEqwoEveroCAf3rvVIjHCKDB6K3F1mXqpgt1oU hQqNPoGgWHGWq60JGNZ9ep09QPHjCG2usJH0KHsn1xS4GEIPCrMOu2d21UYoF43IprWC NeLW9aZTCKSVrmx9YmCmWyRkbjVxUZcVe+6N3P0YSUE3Ds2dvuO39tQh5eOnSU8/X5Za c96wDPkxJIb4yfJFV+yZVUkIgR7sPe3KTeC91f3jeSf3Kf2yRNY9MA1TADzofrJ/mkG+ anNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703141961; x=1703746761; 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=qbIqxGfJOEDLzvXJ7s1G/kNvsieJHgfRNco3QE6a50Q=; b=qoT9nwKITt+4KWr1NLBjzswz2IOAQcZ8Fu0mh0yV3eb5+rvJwaUzvlXRoeo5a2/5cj y/cf6QtoAjIeG1H+ooacKSL6gPj/0zM+pmIg4nnUO+DxVKJrPOWSr8zgRcigRUfqItdy oeUZq3N4bQlZOlf6UiXHxi5KTZQ24CZiPUov/z4fp5s94spvsBtQoeGmvAX+GWS803oR nDREdXAUMWkiEKjmlD62gpEq61fK9bfBvstFe26BWySTJkRR4AuvY5lkqGIygpsbe2rd 6baVMMayoEdf5GzH8MQPjJrHtYOy4o1jyhpOc5YXPL/6Ojtzl5gksEX3NDjry2QnFWyN ayEA== X-Gm-Message-State: AOJu0YxztNsxkgmcRFuMEE/Anr8bAZwOe759NNmH/Fv3Pwc5Wvvw7CQf OEIK3+GqG2ZPADfDmD6tuek= X-Google-Smtp-Source: AGHT+IGsFsWqs9DpUopatdBzmv8SG/w1kdVER2UIqmSe+ehzV9SIggGBUqaafZco+T1eV/db7AqUXw== X-Received: by 2002:a05:6e02:12c2:b0:35f:cb0b:d4cd with SMTP id i2-20020a056e0212c200b0035fcb0bd4cdmr2117092ilm.16.1703141960629; Wed, 20 Dec 2023 22:59:20 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id fi1-20020a056638630100b0046b108628e5sm335869jab.76.2023.12.20.22.59.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Dec 2023 22:59:19 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2023 23:59:17 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3][RFC] RISC-V: Add non-vector types to pipelines Content-Language: en-US To: Edwin Lu , gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, kito.cheng@gmail.com References: <20231215185328.794425-1-ewlu@rivosinc.com> <20231215185328.794425-2-ewlu@rivosinc.com> <819cc2ca-38ef-49dc-9d1e-e5af60ccd66b@gmail.com> <9a30c4b3-3b78-41f4-8e72-994275d68e26@rivosinc.com> From: Jeff Law In-Reply-To: <9a30c4b3-3b78-41f4-8e72-994275d68e26@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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/20/23 15:11, Edwin Lu wrote: >> >> >>>   (define_insn_reservation "generic_xfer" 3 >>>     (and (eq_attr "tune" "generic") >>> -       (eq_attr "type" "mfc,mtc,fcvt,fmove,fcmp")) >>> +       (eq_attr "type" "mfc,mtc,fcvt,fmove,fcmp,cbo")) >>>     "alu") >> cbo is probably closer to a load/store than it is a transfer operation. >> > That makes sense. I wasn't sure where exactly to put it since we have > two separate insn reservations for load and store and from my > understanding, the same type cannot be in two separate insn > reservations. Would a new insn reservation like > (define_insn_reservation "generic_load_store" 2 ...) work? I'd probably just treat cbo instructions as stores. In fact, you could probably get away with using "store" as the type and dropping the cbo type entirely. > >>>   (define_insn_reservation "generic_branch" 1 >>>     (and (eq_attr "tune" "generic") >>> -       (eq_attr "type" "branch,jump,call,jalr")) >>> +       (eq_attr "type" "branch,jump,call,jalr,ret,trap,pushpop")) >>> +  "alu") >> pushpop are a mix of some pure memory operations and some mixed memory >> + branch. >> >> However, from a scheduling standpoint the branch isn't particularly >> interesting.  So I'd have pushpop as a load/store. So for these I think those which do pushes you could legitimately change to the "store" type and pops could be changed to a "load" type. If something does both just call it a load. That's going to be the most useful from a scheduling standpoint I suspect. Jeff