From: Edwin Lu Date: Wed, 1 Nov 2023 17:30:18 +0000 (-0700) Subject: RISC-V: Add check for types without insn reservations X-Git-Tag: basepoints/gcc-15~5050 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a29ce9bf8d87e632840bacacb663ece90a5c7710;p=thirdparty%2Fgcc.git RISC-V: Add check for types without insn reservations 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 --- diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 895a098cd9a6..08ff05dcc3f9 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; }