Message ID | 20231101181713.54765-1-ewlu@rivosinc.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp615107vqx; Wed, 1 Nov 2023 11:18:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDlcagbbiKDn7tG13d30g+uO03C2vJhhKzocBat+pfgeS5TEEl1KQgImPcSHX0sY8px9t6 X-Received: by 2002:a05:6214:20ce:b0:66d:9e52:a431 with SMTP id 14-20020a05621420ce00b0066d9e52a431mr24218825qve.3.1698862683352; Wed, 01 Nov 2023 11:18:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698862683; cv=pass; d=google.com; s=arc-20160816; b=xPaEJE0NWtIINg8RusFMtL+oUQZSi1FX33yj7qPD43TbjGUIJRTIJoGNX1JaywQ2VJ kH1TT4hitgTz252PdZfwlymd3pI+4W1HYgKAK1H6tkpPjV6BmXsuJcLdOkdOJigXRNun ehwQx4jhRAeRQDSGzODx6u4SUzsr7aJeXbCZeSx5mLPB10/JA3CZ3hc3jKh3/XBVHRYZ 7WPep4RQKr1ex579EA/WCfV/7aANAbvQfJgpZtmi57y595TgxPyZgSNdfLZMI7rzaOWY 5/eoX/06wcmhXu6xoPQS9a3l+ODzSyqB6DBkTT4oTZOcUC8qg7bweR+/T+ka7M3/KLoY owwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=Z5hMQz7yJbu1N0l08t2eRrfYO10BA4tjudW4iMg4kFU=; fh=r+SIYcgLopsTG8D0vSkuNNcbfbLGreWBAuINt5YEr6Q=; b=tEXn01kzhQQTR1qHLy0uLcznLfXw+hB1DkzRo5x+0GN9WjvoSrjy+CNbdl9LEWQSMB cb4yiNw38ncPSGA4hK5XmV1G6PER4QeheDE5HefgC0Zx/pYNUPvcBiZSuwQt6Pwc/X+M Nz6l1/Q0DFvuUKmiEhqoWgZFAGt+UJtVn2kxCAswUa4IeKpga/6s2oLnEclU7dzmBHNc FS1uuDbMEziNKT5dv4xb5RfdCfk+xOtVnFskOwLzq4tMfzTYLxTwsVLZaLuwx20qrmV+ V9RIlwEmakgd2i4PsQOjwiuu4hiN6CCpJbLK9BWJ1Z0sd0WuxY7Sd12wjMKuQHvOmBQg LEyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=r5rP1ec3; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id cx9-20020a056214188900b00670e29dba92si2898850qvb.441.2023.11.01.11.18.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 11:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=r5rP1ec3; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 17DF23858C60 for <ouuuleilei@gmail.com>; Wed, 1 Nov 2023 18:18:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by sourceware.org (Postfix) with ESMTPS id 79BD73858D1E for <gcc-patches@gcc.gnu.org>; Wed, 1 Nov 2023 18:17:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79BD73858D1E 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 79BD73858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698862660; cv=none; b=EmsHA5Gv2oDjqGwrC7C7UIxT2Thd0X/AedPaQB9yG0fXs0G8/cpfX0yuJWzL1/gisKJ/dWWB7pV+7mtNRPg80nlEyAQLxY1uEvPi3HcVbXZbJtUqzS5C+3Z11uRyuezwVzbjI+njQUlfI3iBLGHkqk9prZu3myz+WOgRTwvNPXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698862660; c=relaxed/simple; bh=MTL/RBVMsQdUMELpOR1INSQQsk0c/xO9bkjhJj50Xqk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=DEJMQN8sz9KG+30/70uQ1Nt+bJiIIR0nIWCl7y9Opk2bPnBrB1BUhsq1R0TAUIXAzyZLRnWlbQTJPz+smQUE3ZKjyGu7TSL3NqPmjg4HCu8slLKEcvYo9fVrh5B2egnVF4Ak9yreenc/ZVXbSmlK61h6oNbUNTY7eMbaOG5Kd1U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1ea82246069so67374fac.3 for <gcc-patches@gcc.gnu.org>; Wed, 01 Nov 2023 11:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698862649; x=1699467449; 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=Z5hMQz7yJbu1N0l08t2eRrfYO10BA4tjudW4iMg4kFU=; b=r5rP1ec3lOEFMU4BjQ6MwDLwWcWz/Rq3Jvvl8krBZzTyyWatvWmhJ2fzr1n/PWc/ke uryVxB8Y9U7YrCmhTphOGv4tRFgb57xZrBTKxcRmJL1wO6cD3JtHnaNTMQuyU5OwvEYm zEKiP0D6D9Sa+Uor12mKSNawNfz1PJhBH0G4XMURh5eFNXODdCwWadngKhBd8MoGs8us OZ5TZufV3D7UYQNmiVrPZNTwqVOoQq0gwKYi+cOjiFfilu9p8XntlKnzq+VofUAfd1fw OoJXaK4Jr5UFL3tGKOdGrQfkUfaaDwv533W8qQUm/fY5QZrJwQPdL6EynvLcrfMAxuSJ qscw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698862649; x=1699467449; 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=Z5hMQz7yJbu1N0l08t2eRrfYO10BA4tjudW4iMg4kFU=; b=td3iM+jr/eONf7Cu80Nz+4Emzv1Bf94ncgKaeENCOCejdzZn4oDbwOk+w9423pSCGM 0t7lR1PKxRfPji29JeoGnXPO1s92aEPqGmdPEO3sk3mrwi9VOseQjQ0YWt28Is42tXuV 6ZqxucblRr5K6y1V3E41fii/3Lq/IDg1sXdI6KQW4QXbot2YHspX7/ep36e4d/6H+0B0 fFM64nEJwUOBYHa5sd2jE3c0ea5dK6UVAsaMXUjtFdKzzoS7rRJah3a4K7aQST7GspLA zUA00Vrp5lzfuCHyBDDkuUCNzYhTTtsO+FGIusjUqDm52SSrzZUQ5ECGZM55GhuFcpdD 6Jfg== X-Gm-Message-State: AOJu0Yxw3H6k4a10La/4w4l3e5GFb1QdRHXQao83VCml+YQtTsBHzcqQ Y2xLyW82Yp45oJrmR0SREwKrFAKGze8b9nZjkjw= X-Received: by 2002:a05:6870:a9a1:b0:1e9:e605:279f with SMTP id ep33-20020a056870a9a100b001e9e605279fmr22533527oab.13.1698862649563; Wed, 01 Nov 2023 11:17:29 -0700 (PDT) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id s3-20020a05687087c300b001ea4324364csm311819oam.12.2023.11.01.11.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 11:17:29 -0700 (PDT) From: Edwin Lu <ewlu@rivosinc.com> To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu <ewlu@rivosinc.com> Subject: [PATCH] RISC-V: Add check for types without insn reservations Date: Wed, 1 Nov 2023 11:17:13 -0700 Message-Id: <20231101181713.54765-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=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781386636992487018 X-GMAIL-MSGID: 1781386636992487018 |
Series |
RISC-V: Add check for types without insn reservations
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Edwin Lu
Nov. 1, 2023, 6:17 p.m. UTC
Now that all insns are guaranteed to have a type, ensure every insn
is associated with a cpu unit/insn reservation.
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_sched_variable_issue): add disabled assert
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
---
gcc/config/riscv/riscv.cc | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On 11/1/23 12:17, Edwin Lu wrote: > Now that all insns are guaranteed to have a type, ensure every insn > is associated with a cpu unit/insn reservation. > > gcc/ChangeLog: > > * config/riscv/riscv.cc (riscv_sched_variable_issue): add disabled assert OK. Really interested to see how often this trips in practice. I suspect often right now ;-) jeff >
On 11/1/2023 11:53 AM, Jeff Law wrote: > > > On 11/1/23 12:17, Edwin Lu wrote: >> Now that all insns are guaranteed to have a type, ensure every insn >> is associated with a cpu unit/insn reservation. >> >> gcc/ChangeLog: >> >> * config/riscv/riscv.cc (riscv_sched_variable_issue): add disabled >> assert > OK. Really interested to see how often this trips in practice. I > suspect often right now ;-) > Committed! On a local test with just rv64gc, actually not that many types were tripped. I think there were around 13 that weren't part of any reservation Edwin > jeff >> >
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 0148a4f2e43..0bfd06902e5 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -7751,6 +7751,12 @@ riscv_sched_variable_issue (FILE *, int, rtx_insn *insn, int more) an assert so we can find and fix this problem. */ gcc_assert (get_attr_type (insn) != TYPE_UNKNOWN); + /* If we ever encounter an insn without an insn reservation, trip + an assert so we can find and fix this problem. */ +#if 0 + gcc_assert (insn_has_dfa_reservation_p (insn)); +#endif + return more - 1; }