This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Out of SSA status and issues
- From: Michael S. Zick <mszick at goquest dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner),dnovillo at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 13 May 2003 08:58:42 -0500
- Subject: Re: [tree-ssa] Out of SSA status and issues
- References: <10305131322.AA13680@vlsi1.ultra.nyu.edu>
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