From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id AAB8A3858C50 for ; Tue, 12 Sep 2023 06:18:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAB8A3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp85t1694499502t6pqi6ne Received: from [10.101.11.9] ( [61.144.172.134]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 12 Sep 2023 14:18:21 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: +ynUkgUhZJmP6GIH9v27vfaPl/I38DeFo+pL2xM0GxSrJBEd0UdXvsWLeERIx tms15cYBRkmDAjvWK+KNIjMPGvGOOuyYSZUIZUeVV+tLGxVQrZ59kIIXqpza96r7x7aNtYp U36zjEy2lbb2ZHm8MI9luYBpqULBdFYCK/UhSrDByNOaxHNFGa9JKmvGqZpC8GGtYRQjN5I gJneYxci/1UCCh/Ltegy5Vypia0Bqopx2G4hX+p16nRtWfArK2PT4PJu9U/0stMWJMr/N1k FFsfU8NRmzsiyvfhzeG5FDtOENegDvMxFkckuo4Dc0e/6n/gyHSMoBwzP2kLXfc36y47uTk gzG2UNJAiOKptCFoiJCxagC0DcqCbj4eyyrfcYMWtSx68cEsC9Qjlb6wm3YGg== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 12121065403766721964 Message-ID: <2D2FD635B8DE557C+d3365535-e376-49df-a8c5-3a968bcfd5bc@rivai.ai> Date: Tue, 12 Sep 2023 14:18:20 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert Content-Language: en-US To: Jeff Law , Edwin Lu , gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com References: <20230911225308.2275313-1-ewlu@rivosinc.com> <9F63A23D4D863426+7ccedfd0-d4fe-4e8f-b06b-fe08817eabce@rivai.ai> <10571303-863f-4cac-b3c8-bc9d1d21c3b3@gmail.com> From: Lehua Ding In-Reply-To: <10571303-863f-4cac-b3c8-bc9d1d21c3b3@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz6a-0 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. > 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. -- Best, Lehua