From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12488 invoked by alias); 26 Feb 2008 17:30:19 -0000 Received: (qmail 12479 invoked by uid 22791); 26 Feb 2008 17:30:18 -0000 X-Spam-Check-By: sourceware.org Received: from mk-outboundfilter-3.mail.uk.tiscali.com (HELO mk-outboundfilter-3.mail.uk.tiscali.com) (212.74.114.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 26 Feb 2008 17:29:58 +0000 X-Trace: 49182239/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$NILDRAM-ACCEPTED/nildram-customers/81.6.217.218 X-SBRS: None X-RemoteIP: 81.6.217.218 X-IP-MAIL-FROM: richard@nildram.co.uk X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAKPbw0dRBtna/2dsb2JhbACBVatx X-IP-Direction: IN Received: from 81-6-217-218.gotadsl.co.uk (HELO firetop.home) ([81.6.217.218]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/AES256-SHA; 26 Feb 2008 17:29:54 +0000 Received: from richard by firetop.home with local (Exim 4.63) (envelope-from ) id 1JU3co-00067w-Fd; Tue, 26 Feb 2008 17:29:54 +0000 To: Peter Bergner Mail-Followup-To: Peter Bergner ,gcc-patches@gcc.gnu.org, rsandifo@nildram.co.uk Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR35371 GCSE loses track of REG_POINTER attribute References: <20080225222624.GA26857@vervain.rchland.ibm.com> From: Richard Sandiford Date: Tue, 26 Feb 2008 18:00:00 -0000 In-Reply-To: <20080225222624.GA26857@vervain.rchland.ibm.com> (Peter Bergner's message of "Mon\, 25 Feb 2008 16\:26\:24 -0600") Message-ID: <87skzfzkvh.fsf@firetop.home> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-02/txt/msg01298.txt.bz2 Peter Bergner writes: > Index: gcse.c > =================================================================== > --- gcse.c (revision 132568) > +++ gcse.c (working copy) > @@ -818,6 +818,24 @@ gcse_main (rtx f ATTRIBUTE_UNUSED) > > /* Misc. utilities. */ > > +/* Create a pseudo reg to copy the result of a reaching expression into. > + Be careful to inherit the REG_POINTER attribute. */ > + > +static rtx > +gen_reaching_reg_rtx (rtx x) > +{ > + rtx reg; > + > + gcc_assert (REG_P (x)); > + > + reg = gen_reg_rtx (GET_MODE (x)); > + > + if (REG_POINTER (x)) > + mark_reg_pointer (reg, REGNO_POINTER_ALIGN (REGNO (x))); > + > + return reg; > +} > + Minor suggestion, but maybe this could go in emit-rtl.c, under a more generic name? Given the performance impact of losing pointer info, it would be nice to have a defined API for creating a register that's like another. Richard