From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5211 invoked by alias); 13 May 2003 15:08:40 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 5145 invoked from network); 13 May 2003 15:08:39 -0000 Received: from unknown (HELO mail.goquest.com) (12.18.108.6) by sources.redhat.com with SMTP; 13 May 2003 15:08:39 -0000 Received: (qmail 28783 invoked by uid 0); 13 May 2003 14:55:26 -0000 Received: from mszick@goquest.com by mail.goquest.com by uid 502 with qmail-scanner-1.15 (spamassassin: 2.31. Clear:. Processed in 0.805664 secs); 13 May 2003 14:55:26 -0000 Received: from unknown (HELO wolf686) (66.90.216.240) by mail.goquest.com with SMTP; 13 May 2003 14:55:25 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Michael S. Zick To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner), dnovillo@redhat.com Subject: Re: [tree-ssa] Out of SSA status and issues Date: Tue, 13 May 2003 15:08:00 -0000 Cc: gcc@gcc.gnu.org References: <10305131322.AA13680@vlsi1.ultra.nyu.edu> In-Reply-To: <10305131322.AA13680@vlsi1.ultra.nyu.edu> MIME-Version: 1.0 Message-Id: <03051308584200.00935@wolf686> Content-Transfer-Encoding: 8bit X-SW-Source: 2003-05/txt/msg01312.txt.bz2 On Tuesday 13 May 2003 08:22 am, Richard Kenner wrote: > I see nothing wrong in replacing 'i + 9' with '*p + 9'. It would > probably not be efficient, but I can't see it being wrong. > > If an optimizer pessimizes the code, I'd consider that "wrong". > > This isn't a machine-dependent issue: with CPU speeds the way they are, > a memory reference is *always* many times more expensive than an addition. Nice generalization, but only relevant while considering '*p' to be an expression. Consider instead that '*p' is just the name given a register's contents. Neither 'i' nor '9' are processor internal. Both are external to the cpu. The memory reference for 'i' is source code implicit, the memory reference for '*p' is source code explicit. Mike