public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Lehua Ding <lehua.ding@rivai.ai>, Edwin Lu <ewlu@rivosinc.com>,
	gcc-patches@gcc.gnu.org
Cc: gnu-toolchain@rivosinc.com
Subject: Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert
Date: Sun, 17 Sep 2023 07:46:32 -0600	[thread overview]
Message-ID: <e9765ff1-5ab6-41c6-b6ee-8aaa939d1177@gmail.com> (raw)
In-Reply-To: <2D2FD635B8DE557C+d3365535-e376-49df-a8c5-3a968bcfd5bc@rivai.ai>



On 9/12/23 00:18, Lehua Ding wrote:
> Hi Jeff,
> 
> On 2023/9/12 11:47, Jeff Law wrote:
>> But that condition is _not_ generally sufficient to prevent these 
>> insns from existing during sched1.  ie, a pass between split1 and 
>> sched1 could create these patterns and successfully match them.  That 
>> in turn would trigger the assertion.
>>
>> can_create_pseudo_p is true up through the register allocator.  As a 
>> result a condition like TARGET_VECTOR && can_create_pseudo_p() is 
>> _not_ sufficient to ensure the pattern does not exist during sched1.  
>> While no pass likely creates these kinds of insns right now in that 
>> window between split1 and sched1, there's no guarantee that will 
>> always be true.
> 
> But if a pass between split1 and sched1 creates these patterns, then an 
> unrecognized error will throw after reload. Is that right? That is to 
> say, this insn patterns is designed to exist only before split1, but now 
> the conditions are a little looser, a little tighter is better if we 
> can. If this is the case, I feel it makes no difference whether the 
> error is thrwoed by sched pass or a pass after reload.
If someone was to create one of these patterns without an associated 
insn type, then the assert would trigger during sched1, and that is 
good.  The earlier we can catch an inconsistency, the better.



> 
>> The simple rule is easy to follow.  Every insn should have a type.  
>> That also gives us a degree of future-proof, even if someone adds 
>> additional passes/capabilities between split1 and sched1.
> 
> However, adding content that you don't need feels even more difficult to 
> understand, and this is just my feeling. It would be clearer if we could 
> set the type according to the purpose of the insn pattern.
I understand your position, but respectfully disagree with the 
conclusion in this case.

jeff

  reply	other threads:[~2023-09-17 13:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 22:52 Edwin Lu
2023-09-12  0:49 ` Jeff Law
2023-09-15 22:51   ` [Committed] " Edwin Lu
2023-09-15 22:51     ` Edwin Lu
2023-09-12  2:33 ` [PATCH] " Lehua Ding
2023-09-12  3:00   ` Jeff Law
2023-09-12  3:17     ` Lehua Ding
2023-09-12  3:47       ` Jeff Law
2023-09-12  6:18         ` Lehua Ding
2023-09-17 13:46           ` Jeff Law [this message]
2023-09-18  7:29             ` Lehua Ding
2023-09-19 17:23               ` Jeff Law

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=e9765ff1-5ab6-41c6-b6ee-8aaa939d1177@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=ewlu@rivosinc.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=lehua.ding@rivai.ai \
    /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).