From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 31BBD38618E5 for ; Fri, 15 Dec 2023 18:53:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 31BBD38618E5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 31BBD38618E5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702666415; cv=none; b=UggA350z46uKpJKqWqJKZ5kTdblvGalkg7Dpq1k/J3Wzuhzd4R2ZZCBJ5++ZC+MDsNi+WxOwP3P+xtYWauU4s0zaO4DLk8WvGy7hjMk4vyat4BrxvWTXGQoWaCPNBqlMVhf+kTRN0k+SUCgN5Q1HkzDrFJOiDf2EYXNRd6JzrXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702666415; c=relaxed/simple; bh=vP6oHX1L4Qs3KhSbFR5ukUlkjFV3smwmtS4HyexEaK8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=KIfox1LThYPiMvbFteE5U2Xnp3m5JH8q6u57wV3/Qfk1CBdVh505zWPYmJ//I1rhp2Xc9pTXhGxoCxdh0ZfnF6RcKRWCVv3fsuDQDmj7LMS0NdMPS/q5KnbGH4DWZa0xK6UxHJuaMf4LG/ZwGmmouIy+eoh31HMNOEQT9o1umBE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3b9efed2e6fso783103b6e.0 for ; Fri, 15 Dec 2023 10:53:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702666413; x=1703271213; 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=pZyGq9xdNmdBZPqX6n680JCnSWSAyJ0pUtTHqgIE9uI=; b=n2jR7rODOQV9kltYNR03ukMeAwdfZWoJDMbW6YnIaluRn0dJx5/h1eZuUpc6Yd55s7 Ugrm3CKp1A8HyRtOnNIzERxUNfPBDEjMhyqcuNj60Oi3UM7FdY3iA21u28938eDubJYX SwOVt2HVEyqR7dp4rl+oSwd6jXruzVdMraejU/pw6/Ve+6NA9oztn3QQkBJEXxb/TtEo TFLw374bmHShZn2G4SqySsDzoUMvBGjKStKPTPlMx9P5tG+hYtbpcqBOmkIM8QKWGXsm +n5P/l7oykfpoUJpGIcD6c8wmCHMwOAmKz2V+rRTacMF74twvbHuuXSJofoLmw62v/Xr Kfdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702666413; x=1703271213; 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=pZyGq9xdNmdBZPqX6n680JCnSWSAyJ0pUtTHqgIE9uI=; b=ccI3ecduZC5JgGZryzwErFmlFYwgPtPKSM5d9l4KUR00fxzR25ipsGR6PTJORXZVZu Vvfn+PLCYICfnrL5JrJhXDiQxkhmUTkiFeR8EMw3aUJE+homInz2jaigBnwVgFGkbr0j NwnlMb2CsG4uEVt4cX/SjvSxRk8FuMakbtQRIGCcfs/oCgkP77FBwrRumJR0Xuj5xae2 98IwfarrvYKcSQ5p2bYGev/O47F6xviGWBfCp9qLTeMoDBsjLoe+CRkFCs8pa1Z4s7WN d1iInPS6a3u2upUJEi8Bf3xi+lEHw/64jgX93xP14axv3/FkCyWfyA72nDosUTcyXw88 w5UQ== X-Gm-Message-State: AOJu0YzO2WzfAHNE3mM4cUGDzXYXIuYARX9oJAoUJ1BQTRwxEEkHoFNv xQ9Pmbhcf+POxrmAeipvIDzGimQvwrhnCmnxYL4= X-Google-Smtp-Source: AGHT+IH1Q4E5P6IQPGwHC0lupPWRx4pWZmvwiaBlRKqFmiA4hV48BTpDS5igGru9x9CGxxtW02TrLA== X-Received: by 2002:a05:6808:2f12:b0:3b9:fbfd:4f04 with SMTP id gu18-20020a0568082f1200b003b9fbfd4f04mr16337817oib.57.1702666413340; Fri, 15 Dec 2023 10:53:33 -0800 (PST) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id s17-20020a056808209100b003b6caf2accfsm3867639oiw.22.2023.12.15.10.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 10:53:33 -0800 (PST) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, kito.cheng@gmail.com, jeffreyalaw@gmail.com, Edwin Lu Subject: [PATCH 0/3][RFC] RISC-V: Associate typed insns to dfa reservation Date: Fri, 15 Dec 2023 10:53:25 -0800 Message-Id: <20231215185328.794425-1-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,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: This series is a prototype for adding all typed instructions to a dfa scheduling pipeline. I've been working on adding insn reservations for all typed instructions to ensure all instructions are part of a dfa pipeline. I don't have a good understanding of vector instruction latency, so I have been struggling with what I should do for those. As of right now, I have copied the insn reservations from generic-ooo.md for vector instructions into the generic.md and sifive-7.md files. This prevents ICEs from enabling the assert but introduces numerous scan dump failures (when tested in linux rv64gcv and rv64gc_zba_zbb_zbc_zbs). Currently, only patch 1/3 RISC-V: Add non-vector types to pipelines does not introduce regressions (when tested against linux rv32/64 gc/gcv on rocket). I hope that the locations I added the insn types make sense. Please let me know if they should change. The final patch enables the assert for insn_has_dfa_reservation. I tested the full patch series on both rocket and sifive-7-series. The series does introduce additional scan dump failures compared to their respective baselines, however, I'm not sure how many failures were due to the patch vs incorrect modeling assumptions. I created PR113035 which has the full testsuite failures I saw (without the patches applied). Edwin Lu (3): RISC-V: Add non-vector types to pipelines RISC-V: Add vector related reservations RISC-V: Enable assert for insn_has_dfa_reservation gcc/config/riscv/generic-ooo.md | 31 ++++---- gcc/config/riscv/generic.md | 131 +++++++++++++++++++++++++++++++- gcc/config/riscv/riscv.cc | 2 - gcc/config/riscv/sifive-7.md | 130 ++++++++++++++++++++++++++++++- 4 files changed, 271 insertions(+), 23 deletions(-) -- 2.34.1