From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id B565E3858D28 for ; Mon, 9 Oct 2023 21:02:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B565E3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-57bca5b9b0aso2766317eaf.3 for ; Mon, 09 Oct 2023 14:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1696885375; x=1697490175; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0lx3MYJFhfnIUvJOTfX1wk7pZQ+vq9fxSRHyxqoUZaA=; b=k1PCThzex4QKktfvPWOccMOyuSTgJ4cm5+rvuMEgrgGNuYrFjH5qvWw+aJM+Z4/PQa zqaG9nXfdpqmzqcqPhf+JqjKdWhO1d5Dt88RTdk8vGDgS3hdxlu/ruTLcdtiEtxCmOX/ pX5YA69s4FlddE/cqzQGDBejViaCmuA74c+k7QfVyMs4Mqfybv8eJ63pk6+JoYCVDj6A K9Rp9WItdbs9nZGNI+vlJatdWfTJBWgqbI117QZbBfRnZhnPJ3atBPA7Ym4JGGQbN/kD eOrG3980jP1A/lKazjFDt9RUTNLm2ldgYV0TGa7rfvZGoWWWyfzrqMxh+iBrKRpKR1TH BSPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696885375; x=1697490175; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0lx3MYJFhfnIUvJOTfX1wk7pZQ+vq9fxSRHyxqoUZaA=; b=fQ/M6xtNUSfrUSL2nQJcBHymHJerFXCq1c4uUT8G0kVWaSYpeBAU2irqZuMleVN5OJ l9vs13tWMyeDNWDMI5brgoY0pg5edyIdZhsV2FemquE3NAD2PWTnRigaDFhUr+MOTlJf OGmV8Rj2jguw1mmMMVAPUx3S2qPOzkPb9tlHB2wCS7aHQS13OaaWEWaOKTciSQhNrgnh YruOobqTxeZIZVw6D2Ye0AxQXydrM6rbAhKGdpw3LKQ72obo71MGTUinZ/fYRrtIPQcq EnFJY/9KxYeYm5+hInHTvOYrTRdWxRUavp71YNGeILpaSnZjIA2NjnuRqSL4ze0Zztm2 R2Rw== X-Gm-Message-State: AOJu0YwI1Sg9KLMPz0Kfa+YnMUF6QoQiatIk2OW9wcvCtdAvQu/3Dup/ O/Kb6XlbcVMFDJ/C7OtDFYdzN7JVCfxgfxNwvbE= X-Google-Smtp-Source: AGHT+IHPvSR1BGXGlY1pXmMc4T1MTSbD56IaEoFffyIBBE09oEj1rbaCcn+41EiIyYYgUiZ57biNoQ== X-Received: by 2002:a4a:6219:0:b0:57b:54c1:3137 with SMTP id x25-20020a4a6219000000b0057b54c13137mr14579501ooc.5.1696885374966; Mon, 09 Oct 2023 14:02:54 -0700 (PDT) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id p124-20020a4a4882000000b0057de3e449c8sm1706887ooa.8.2023.10.09.14.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:02:54 -0700 (PDT) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [RFC] RISC-V: Handle new types in scheduling descriptions Date: Mon, 9 Oct 2023 14:02:09 -0700 Message-ID: <20231009210250.947831-1-ewlu@rivosinc.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,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: Now that every insn is guaranteed a type, we want to ensure the types are handled by the existing scheduling descriptions. There are 2 approaches I see: 1. Create a new pipeline intended to eventually abort (sifive-7.md) 2. Add the types to an existing pipeline (generic.md) Which approach do we want to go with? If there is a different approach we want to take instead, please let me know as well. Additionally, should types associated with specific extensions (vector, crypto, etc) have specific pipelines dedicated to them? * config/riscv/generic.md: update pipeline * config/riscv/sifive-7.md (sifive_7): update pipeline (sifive_7_other): Signed-off-by: Edwin Lu --- gcc/config/riscv/generic.md | 3 ++- gcc/config/riscv/sifive-7.md | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/generic.md b/gcc/config/riscv/generic.md index 57d3c3b4adc..338d2e85b77 100644 --- a/gcc/config/riscv/generic.md +++ b/gcc/config/riscv/generic.md @@ -27,7 +27,8 @@ (define_cpu_unit "fdivsqrt" "pipe0") (define_insn_reservation "generic_alu" 1 (and (eq_attr "tune" "generic") - (eq_attr "type" "unknown,const,arith,shift,slt,multi,auipc,nop,logical,move,bitmanip,min,max,minu,maxu,clz,ctz,cpop")) + (eq_attr "type" "unknown,const,arith,shift,slt,multi,auipc,nop, + logical,move,bitmanip,min,max,minu,maxu,clz,ctz,cpop,trap,cbo")) "alu") (define_insn_reservation "generic_load" 3 diff --git a/gcc/config/riscv/sifive-7.md b/gcc/config/riscv/sifive-7.md index 526278e46d4..e76d82614d6 100644 --- a/gcc/config/riscv/sifive-7.md +++ b/gcc/config/riscv/sifive-7.md @@ -12,6 +12,8 @@ (define_cpu_unit "sifive_7_B" "sifive_7") (define_cpu_unit "sifive_7_idiv" "sifive_7") (define_cpu_unit "sifive_7_fpu" "sifive_7") +(define_cpu_unit "sifive_7_abort" "sifive_7") + (define_insn_reservation "sifive_7_load" 3 (and (eq_attr "tune" "sifive_7") (eq_attr "type" "load")) @@ -106,6 +108,11 @@ (define_insn_reservation "sifive_7_f2i" 3 (eq_attr "type" "mfc")) "sifive_7_A") +(define_insn_reservation "sifive_7_other" 3 + (and (eq_attr "tune" "sifive_7") + (eq_attr "type" "trap,cbo")) + "sifive_7_abort") + (define_bypass 1 "sifive_7_load,sifive_7_alu,sifive_7_mul,sifive_7_f2i,sifive_7_sfb_alu" "sifive_7_alu,sifive_7_branch") -- 2.34.1