[PATCH] Fix canonicalization of addresses

Eric Botcazou ebotcazou@adacore.com
Wed Jan 7 10:25:00 GMT 2009


> Ok, I guess I can agree with that one (it makes it more obvious
> what happens).  I'll bootstrap & test & apply this.

Thanks.  Please remove the obsolete comment in extract_muldiv, see my patch.

What about the canonicalization of offsets just before RTL expansion?  Your 
2005 patch has de factor changed it and this can be harmful too.  I have an 
Ada testcase on PowerPC with a lot of consecutive, perturbated multi-dim 
accesses

  A[i1+1][i2][i3][i4][i5][i6]
  A[i1][i2+1][i3][i4][i5][i6]
  A[i1][i2][i3+1][i4][i5][i6]
  A[i1][i2][i3][i4-1][i5][i6]

and so on for which it's a performance killer at -O2 because RTL CSE is 
seriously hampered and cannot factorize all the (base + index) expressions.
The factorization is *optimal* with GCC 4.1, all the accesses use the same 
(base + index) expression, only the displacements vary.

> Is there a bugzilla I can reference for the problem?

Andrew?

-- 
Eric Botcazou



More information about the Gcc-patches mailing list