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 [thread overview]
Message-ID: <20231101181713.54765-1-ewlu@rivosinc.com> (raw)
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(+)
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;
}
--
2.34.1
next reply other threads:[~2023-11-01 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 18:17 Edwin Lu [this message]
2023-11-01 18:53 ` Jeff Law
2023-11-02 23:01 ` [Committed] " Edwin Lu
2023-11-02 23:01 ` Edwin Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231101181713.54765-1-ewlu@rivosinc.com \
--to=ewlu@rivosinc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gnu-toolchain@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).