From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15488 invoked by alias); 10 Nov 2011 15:28:39 -0000 Received: (qmail 15480 invoked by uid 22791); 10 Nov 2011 15:28:38 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,SARE_ADULT2 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 15:28:25 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 9C716CB0367; Thu, 10 Nov 2011 16:28:26 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i1nfEH9wkCkn; Thu, 10 Nov 2011 16:28:16 +0100 (CET) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id AAD6ACB035D; Thu, 10 Nov 2011 16:28:16 +0100 (CET) From: Eric Botcazou To: Joern Rennecke Subject: Re: RFT: Fix PR middle/end-40154 Date: Thu, 10 Nov 2011 16:23:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org References: <00264351905752@mail.embecosm.com> <201111081410.26878.ebotcazou@adacore.com> <20111108082723.6zscm1ij6ssks40s-nzlynne@webmail.spamcop.net> In-Reply-To: <20111108082723.6zscm1ij6ssks40s-nzlynne@webmail.spamcop.net> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201111101627.02702.ebotcazou@adacore.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg01422.txt.bz2 > No, it isn't. Expanders call other expanders to do fancy stuff. When > everything is done, they tag a REG_EQUAL note on the last insn. > One of the purposes of set_unique_reg_note is lubricate this process: > the layered expanders can add multiple REG_EQUAL notes. We only want > the most high-level note, so we discard the previous one from the > next lower level. Well, we realize now that we only want the most > high-level note that makes sense, actually. We either have to make it > make sense, or abandon adding it. This would have been a valid design 20 years ago when notes were implemented. But, for the past couple of decades, set_unique_reg_note hasn't touched the datum and all bugs over the years in this area have been fixed in the caller. So this one should be fixed the same way, I see no reason to special-case it. > If every expander has to analyze the instructions that have been issued > to figure out if the new note needs to be modified, or cannot be applied > at all, you end up with umpteen duplications of the checks I added to > set_unique_reg_note prepended to its call sites. Yes, expanders must know what they're doing, but this isn't new. -- Eric Botcazou