[PATCH] Fix canonicalization of addresses
Wed Jan 7 11:07:00 GMT 2009
On Wed, Jan 7, 2009 at 11:09 AM, Eric Botcazou <firstname.lastname@example.org> wrote:
>> 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
> 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.
The performance should be "killed" only from within loops, right? So
I still think that IVOPTs should properly handle this case.
Note that the original patch just decided for
" /* No identical multiplicands; see if we can find a common
power-of-two factor in non-power-of-two multiplies. This
can help in multi-dimensional array access. */"
instead of the conflicting
" We also canonicalize (X + 7) * 4 into X * 4 + 28 in the hope that either
the machine has a multiply-accumulate insn or that this is part of an
I still am interested in why this only manifests with -Os - does RTL
forwprop "fix" it?
>> Is there a bugzilla I can reference for the problem?
This is what I applied after bootstrapping and testing on
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1601 bytes
Desc: not available
More information about the Gcc-patches