[tree-ssa] Fix PR 14470

Jason Merrill jason@redhat.com
Thu Apr 15 20:06:00 GMT 2004


On Thu, 15 Apr 2004 15:48:17 -0400, Diego Novillo <dnovillo@redhat.com> wrote:

> On Thu, 2004-04-15 at 15:41, Richard Henderson wrote:
>> On Thu, Apr 15, 2004 at 02:39:40PM -0400, Diego Novillo wrote:
>> > I've already established that.  My problem is with the pessimization
>> > induced by Jason's preferred approach.
>> 
>> Which was preferred?  Personally I think the temporary for the
>> index will probably work out best.
>> 
> That's what I thought too.  Jason then said he would actually prefer the
> one that forces the gimplifier to create minimal lvalues for postfix
> expressions (the one that creates the pointer arithmetic mess).
>
> I would rather just have a temporary in the array index to avoid the
> extra hassle.

The min-lval approach is directly dealing with the actual problem, namely
an lvalue expression which may change which object it refers to.  The array
index approach deals with one instance of the problem, and causes
unnecessary modification of array refs which don't have this problem.

I would expect the same problem to occur with something along the lines of

  d = (*d)++;

Jason



More information about the Gcc-patches mailing list