From patchwork Wed Jan 10 01:31:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Lu X-Patchwork-Id: 186661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp519379dyi; Tue, 9 Jan 2024 17:34:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQt4F7DS2sphS0J9vXvOytXRQZk4BUXPWw8c6JGONTWMWlTdVxVW0AXwXHZVeTJtD+/3mZ X-Received: by 2002:a05:620a:2792:b0:783:1567:8826 with SMTP id g18-20020a05620a279200b0078315678826mr340288qkp.30.1704850476165; Tue, 09 Jan 2024 17:34:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704850476; cv=pass; d=google.com; s=arc-20160816; b=FLRYzF5qUajFLDwK+Po24tX+qb00cje+Whyzd0rsZ6eZf3sVGByItCDM4uIcrI4n9K HiDiG7gQXSnhvOoCOAZLfK6LZy/aOd/W6MG/QHrRd9tMj9II4Z9ryz0QaYkyGJTXUtI0 x6bJRPw9VwpwA3U1qMn1VgnJ9yEHKXkoS+zG4SuiYh3eLsjb+eieZ61E172k/n1MTxHN 7OUyi4B9tZW7jj7hZ2wiKdBDzdyHnHTwG0HVJYKVmksP6TvXizUBnyplyemGtYGDxsK4 n6LNF9IY/b5qTVOFbrrlepqYaEJMXyjtU5GJ8jHHdvRRZjnQgu7eL4VjU5maHebPdxPA YhxQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=++kFcIdrCJcOrBFKyqFfbuaKSQqveMaYPEHiI5uIcXs=; fh=r+SIYcgLopsTG8D0vSkuNNcbfbLGreWBAuINt5YEr6Q=; b=YVNwtrckQ940cZ9n/mX1LQqPgbtZ+jz0iOAxuE/3gduUKHzBqU1/tDJjhBZgsNQHo1 yfodGfU1GrXMtvBGKyTt+9pWeLn+XnKOYGVXkjVTbDInKCsX18R+9Bd1YdLYBOV4i/GO 7nAdk9YdE5dSfPNnqrU+PwcZuowOf/2QrJF/jGdackpVB7K3pwxoFj4x7MeLEMU3YS9p KmD68ncPOFVhRpUY/VGLTIyHXozCIjjNSocomXkIg/q1xwetgMfnbvvxRelyQvF1R2pM uuVlkh7h9YBPpYn4Mkjlq0YYzAKud0JTd5+GvkAbCfd2vz2PoNTP9X/95wQtfGe8Ys4u 7kiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=NE74diNI; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id oq47-20020a05620a612f00b0078314f7fb63si2940843qkn.396.2024.01.09.17.34.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 17:34:36 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=NE74diNI; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 D486D3858D33 for ; Wed, 10 Jan 2024 01:34:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id C53E43858C52 for ; Wed, 10 Jan 2024 01:32:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C53E43858C52 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 C53E43858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704850342; cv=none; b=bwhnimkmIWZgBTf56TiR39aisjayxVlzgkj0HyaTH7gJdMosQFtsnT9j/oBnzANaeAyZHXYTA0dHLKbM0mEg1f5x2P2A2tTLdirr7c4PNXDFwOHh2+E/Ggoyef6HAM2KtF5nj1Lf3WY6pC/yqT3YYDgt8KwaPqb6L2GQ6GnCbjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704850342; c=relaxed/simple; bh=TAmk0UWjVKDFk2ul+1pwhui1ZSEWpibrUjy3mLDsbAg=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OjXNLPUKjdfnRWEQq/5L+O/ALF7H6j6+iNj/Bfc1FvNwjHj0jqt8t2plVw3rVkwoDl1ajdlR1p+f+tZnRnluK9rhmjPnpYAAU0Md8WnwYZUV9eHNKvX5Wwe294uAU3Ijllcgp2QK+4oDnk8etAi4D2J/OGBeb7zEoXdUgwrVN7M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6ddeec84e35so299564a34.3 for ; Tue, 09 Jan 2024 17:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1704850340; x=1705455140; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=++kFcIdrCJcOrBFKyqFfbuaKSQqveMaYPEHiI5uIcXs=; b=NE74diNI0H+r2wKFy+Dq77XR6am/nN8HuVQBsL1OB1gnVhpdnhtAp9zYq5nG9T7hU1 lutehsT/pWtOSFoHfHZGg1ayDX5NL4qpT6uXf5pMo0UNi7KyfNmKBz/KLApwYnUOWc9z /RVyng3qMsCH6DU+X+/l96vDIi5fAS4zjoidgbhUHvwiCywQtX2bxY0Nr9stSO+kdAey wXL6NEpf9EXsSPxhb+HUgNN63Wi+3QSI1aBS5aZhHGrwPwB5vzCZ7/KSH45rBSAgPIRK CvClCKb/w10qcNNHveHJEId+lYv2mgBGLBO79ICJ9MGiDQwQR9xcEOolno/8HMPSkTsd Z7qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704850340; x=1705455140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=++kFcIdrCJcOrBFKyqFfbuaKSQqveMaYPEHiI5uIcXs=; b=nE4HR4idS5Crlstnnc1EhgTEtaHAsKeBNrslPZvOAi98aM3vSY9eX/50eyHne40R9l OkxH26xI/C+TebohVa6c3vdnAXGYMXmIUcmJQPFlAZzDxyVV2JxQNy7jq7ka1AaqY2uP obYbslmc88aTradztEwF8rRqQEZjEvpHzZUm5Sg1jtuIvbULLEds2AFvUNSqshMW13B5 VoXvoREKtBt7hO5uIS0rvrfToUrxAG1rdshw8KMWl5cnw7ot7x7Ouy7jTpHJeBsrHM41 /e+vncnmv/83x9QxSKkoWaKtgaJIbqV6zeH27KHNVVYOsxERtAzSm9yoRNAPtYOAWym9 ERAA== X-Gm-Message-State: AOJu0Yy2+voqrjPwSb+6v3i0uKaLbYKYqePXP7YtkKxoTYWfsTfvxv+k wFNWwjqUcJxSVsneJVfb3nzJFq6TbboHxPrFMVa8zZnJBXk= X-Received: by 2002:a9d:6e0f:0:b0:6dc:2e3a:fef6 with SMTP id e15-20020a9d6e0f000000b006dc2e3afef6mr210543otr.56.1704850340133; Tue, 09 Jan 2024 17:32:20 -0800 (PST) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id a9-20020a9d4709000000b006dc81d1d203sm565423otf.73.2024.01.09.17.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 17:32:19 -0800 (PST) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH V2 4/4][RFC] RISC-V: Enable assert for insn_has_dfa_reservation Date: Tue, 9 Jan 2024 17:31:59 -0800 Message-Id: <20240110013159.2645757-5-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240110013159.2645757-1-ewlu@rivosinc.com> References: <20240110013159.2645757-1-ewlu@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 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, URIBL_BLACK 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787665293004948086 X-GMAIL-MSGID: 1787665293004948086 Enables assert that every typed instruction is associated with a dfa reservation gcc/ChangeLog: * config/riscv/riscv.cc (riscv_sched_variable_issue): enable assert Signed-off-by: Edwin Lu --- V2: - No changes --- gcc/config/riscv/riscv.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 32183d63180..e275fcc2245 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -8150,9 +8150,11 @@ riscv_sched_variable_issue (FILE *, int, rtx_insn *insn, int more) /* If we ever encounter an insn without an insn reservation, trip an assert so we can find and fix this problem. */ -#if 0 + if (! insn_has_dfa_reservation_p (insn)) { + print_rtl(stderr, insn); + fprintf(stderr, "%d", get_attr_type (insn)); + } gcc_assert (insn_has_dfa_reservation_p (insn)); -#endif return more - 1; }