public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Add check for types without insn reservations
@ 2023-11-01 18:17 Edwin Lu
  2023-11-01 18:53 ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Edwin Lu @ 2023-11-01 18:17 UTC (permalink / raw)
  To: gcc-patches; +Cc: gnu-toolchain, Edwin Lu

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Add check for types without insn reservations
  2023-11-01 18:17 [PATCH] RISC-V: Add check for types without insn reservations Edwin Lu
@ 2023-11-01 18:53 ` Jeff Law
  2023-11-02 23:01   ` [Committed] " Edwin Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2023-11-01 18:53 UTC (permalink / raw)
  To: Edwin Lu, gcc-patches; +Cc: gnu-toolchain



On 11/1/23 12:17, Edwin Lu wrote:
> 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
OK.  Really interested to see how often this trips in practice.  I 
suspect often right now ;-)

jeff
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Committed] RISC-V: Add check for types without insn reservations
  2023-11-01 18:53 ` Jeff Law
@ 2023-11-02 23:01   ` Edwin Lu
  2023-11-02 23:01     ` Edwin Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Edwin Lu @ 2023-11-02 23:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: gnu-toolchain

On 11/1/2023 11:53 AM, Jeff Law wrote:
> 
> 
> On 11/1/23 12:17, Edwin Lu wrote:
>> 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
> OK.  Really interested to see how often this trips in practice.  I 
> suspect often right now ;-)
> 
Committed! On a local test with just rv64gc, actually not that many 
types were tripped. I think there were around 13 that weren't part of 
any reservation

Edwin
> jeff
>>
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Committed] RISC-V: Add check for types without insn reservations
  2023-11-02 23:01   ` [Committed] " Edwin Lu
@ 2023-11-02 23:01     ` Edwin Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Edwin Lu @ 2023-11-02 23:01 UTC (permalink / raw)
  To: Jeff Law, gcc-patches; +Cc: gnu-toolchain

On 11/1/2023 11:53 AM, Jeff Law wrote:
> 
> 
> On 11/1/23 12:17, Edwin Lu wrote:
>> 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
> OK.  Really interested to see how often this trips in practice.  I 
> suspect often right now ;-)
> 
Committed! On a local test with just rv64gc, actually not that many 
types were tripped. I think there were around 13 that weren't part of 
any reservation

Edwin
> jeff
>>
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-02 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01 18:17 [PATCH] RISC-V: Add check for types without insn reservations Edwin Lu
2023-11-01 18:53 ` Jeff Law
2023-11-02 23:01   ` [Committed] " Edwin Lu
2023-11-02 23:01     ` Edwin Lu

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).