From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id C98F3385840F for ; Sun, 17 Sep 2023 13:46:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C98F3385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c3cbfa40d6so33232205ad.1 for ; Sun, 17 Sep 2023 06:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694958398; x=1695563198; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bPq2jTruDF6W5I8oJF+qSIG4zfbj14EGkwg4Yx8V7uE=; b=aBbLnU6uVVjGjwHM7gogCKMMPcpdpV6R398x6+WTVt116s+oEf6/4BlI21PMSEJdXL P/NZ8ErjRqyu1lMuczHHjz7ULHNLLm7e78kCcZDDGFGOtopShrx8WGyelXLsAy3vVSS7 j8D474LiczZQ9+J+6HhaKeLAmS0Z+oYuQFBGv6zXAHfnO9D2+zGeTuUSJB0u/dtBEd/U LV+U6ESy1CmtxivmNgzmgEqur5K4OCym4mPntowtvBIt30NAsivW4J+WTQvbrkXYZ2Sd oRFajvZCMSJTgbfm31xiurPwb/rKA4q7egz19tVuw5xAETJkPR8TxxpTnjmdxPIfDAZC VDzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694958398; x=1695563198; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bPq2jTruDF6W5I8oJF+qSIG4zfbj14EGkwg4Yx8V7uE=; b=X02LRyuPAGktBdvuFXkC0Vfu9SdLv86TEx9MN9uKk+qvGhZt6QDf8rOiK6rP0xd8Yg Ri3AoaZ7mc5DpeadZkfZm1mg/ioo6pAwvAWBJFZrBGBFCogxABNFYcnN0Tf/SWUTVLkT 9bnn5/9J5sTWH/mAUfjUCC462K7t894jpJRJ3mg5c3JomEWXV5cfgpE+RCqbu+KBjFey fXFPuc7Qjp2IbP4MSxlq2lMzk5N0i6zscZ0pIDSyvtoNyHBwup+dQTnYbtgcvBZOG/Cv 4Wx/QajL7DH3yLJByQ/Y7UbEMKUxJ4x1of8O76Gs2XgGdrhKPNASVDQDXUaqndxonFgX dNAg== X-Gm-Message-State: AOJu0YyP5b1ory6x+sBQ+67LM9I0q4Rqm2/z8rHjLVZaiOpQg4Gp8FdZ UvnvNRvjXUmuu6IEhfveTKY= X-Google-Smtp-Source: AGHT+IEO8zHDdmX48kgOpgSRxqfq7egTIghzTcOxtgBVvNAwj084FltMLsA955mpoT9NXN1WhzK8mA== X-Received: by 2002:a17:903:120c:b0:1c4:2641:7744 with SMTP id l12-20020a170903120c00b001c426417744mr8684321plh.25.1694958397589; Sun, 17 Sep 2023 06:46:37 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id z4-20020a170902ee0400b001b88da737c6sm1185835plb.54.2023.09.17.06.46.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Sep 2023 06:46:36 -0700 (PDT) Message-ID: Date: Sun, 17 Sep 2023 07:46:32 -0600 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: Lehua Ding , 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> <2D2FD635B8DE557C+d3365535-e376-49df-a8c5-3a968bcfd5bc@rivai.ai> From: Jeff Law In-Reply-To: <2D2FD635B8DE557C+d3365535-e376-49df-a8c5-3a968bcfd5bc@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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