From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19195 invoked by alias); 21 Oct 2009 20:36:43 -0000 Received: (qmail 19185 invoked by uid 22791); 21 Oct 2009 20:36:43 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Oct 2009 20:36:39 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LKaag0001657; Wed, 21 Oct 2009 16:36:36 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9LKaZrX002356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Oct 2009 16:36:36 -0400 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.2/8.14.2/Submit) id n9LKaYVq006091; Wed, 21 Oct 2009 22:36:34 +0200 Date: Wed, 21 Oct 2009 20:45:00 -0000 From: Jakub Jelinek To: Ulrich Weigand , Bernd Schmidt , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: Use simplify_replace_rtx rather than wrap_constant Message-ID: <20091021203634.GN14664@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <200910211715.n9LHFuZc008558@d12av02.megacenter.de.ibm.com> <87iqe81p6l.fsf@firetop.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87iqe81p6l.fsf@firetop.home> User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes 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: 2009-10/txt/msg01385.txt.bz2 On Wed, Oct 21, 2009 at 09:12:50PM +0100, Richard Sandiford wrote: > * simplify-rtx.c (simplify_replace_fn_rtx): Handle UNSPECs > and UNSPEC_VOLATILEs too. I think we shouldn't special case UNSPEC*. There might be something else too (e.g. CONCAT, CONCATN, CONST, PRE_DEC, ...). If this routine is to be used, it IMHO should just in the case that isn't already handled go through the format string and for any 'e's there simplify_replace_fn_rtx the operand, if it returns something different shallow_copy_rtx x unless already done. Similarly for 'E'. In your handling of UNSPEC, I don't understand the copy_rtx, I think currently simplify_replace_rtx doesn't guarantee 100% unsharing of everything, so I think you should unshare only the operands where recursive call actually changed something. Jakub