public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Edwin Lu <ewlu@rivosinc.com>
To: gcc-patches@gcc.gnu.org
Cc: gnu-toolchain@rivosinc.com, Edwin Lu <ewlu@rivosinc.com>
Subject: [PATCH V2 4/4][RFC] RISC-V: Enable assert for insn_has_dfa_reservation
Date: Tue,  9 Jan 2024 17:31:59 -0800	[thread overview]
Message-ID: <20240110013159.2645757-5-ewlu@rivosinc.com> (raw)
In-Reply-To: <20240110013159.2645757-1-ewlu@rivosinc.com>

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 <ewlu@rivosinc.com>
---
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;
 }
-- 
2.34.1


      parent reply	other threads:[~2024-01-10  1:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10  1:31 [PATCH V2 0/4][RFC] RISC-V: Associate typed insns to dfa reservation Edwin Lu
2024-01-10  1:31 ` [PATCH V2 1/4][RFC] RISC-V: Add non-vector types to dfa pipelines Edwin Lu
2024-01-10  1:31 ` [PATCH V2 2/4][RFC] RISC-V: Add vector related reservations Edwin Lu
2024-01-10 16:00   ` Robin Dapp
2024-01-10 18:24     ` Edwin Lu
2024-01-10 18:24       ` Edwin Lu
2024-01-10 19:16       ` Robin Dapp
2024-01-10 22:39         ` Edwin Lu
2024-01-10 22:39           ` Edwin Lu
2024-01-10  1:31 ` [PATCH V2 3/4][RFC] RISC-V: Use default cost model for insn scheduling for tests affected in PR113249 Edwin Lu
2024-01-10  1:31 ` Edwin Lu [this message]

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=20240110013159.2645757-5-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).