From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 044C3383302B for ; Tue, 22 Dec 2020 13:56:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 044C3383302B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 0BMDtlna024626; Tue, 22 Dec 2020 07:55:47 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0BMDtkto024625; Tue, 22 Dec 2020 07:55:46 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 22 Dec 2020 07:55:46 -0600 From: Segher Boessenkool To: "Kewen.Lin" Cc: GCC Patches , Vladimir Makarov , Bill Schmidt Subject: Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos Message-ID: <20201222135546.GD2672@gate.crashing.org> References: <6e1b52f1-a038-9725-38af-5e3007023718@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e1b52f1-a038-9725-38af-5e3007023718@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2020 13:56:49 -0000 Hi! Just a dumb formatting comment: On Tue, Dec 22, 2020 at 04:05:39PM +0800, Kewen.Lin wrote: > This patch is to make move_unallocated_pseudos consistent > to what we have in function find_moveable_pseudos, where we > record the original pseudo into pseudo_replaced_reg only if > validate_change succeeds with newreg. To ensure every > unallocated pseudo in move_unallocated_pseudos has expected > information, it's better to add a check and skip it if it's > unexpected. This avoids possible ICEs in future. > > btw, I happened to found this in the bootstrapping for one > experimental local patch, which is considered as impractical. > --- a/gcc/ira.c > +++ b/gcc/ira.c > @@ -5111,6 +5111,11 @@ move_unallocated_pseudos (void) > { > int idx = i - first_moveable_pseudo; > rtx other_reg = pseudo_replaced_reg[idx]; > + /* If there is no appropriate pseudo in pseudo_replaced_reg, it > + means validate_change fails for this new pseudo in function > + find_moveable_pseudos, then bypass it here.*/ Dot space space. The patch sounds fine to me. Hard to tell without seeing the patch that exposed the problem (for onlookers like me who do not know this code well, anyway ;-) ) Segher