]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Add check for types without insn reservations
authorEdwin Lu <ewlu@rivosinc.com>
Wed, 1 Nov 2023 17:30:18 +0000 (10:30 -0700)
committerEdwin Lu <ewlu@rivosinc.com>
Thu, 2 Nov 2023 22:55:43 +0000 (15:55 -0700)
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

index 895a098cd9a6258624433d6545f0e044d5083fe9..08ff05dcc3f9f98190ce4cdd8a85b5c47e55645f 100644 (file)
@@ -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;
 }