Revision 107218 changed addressing mode generation
Bernd Schmidt
bernds_cb1@t-online.de
Sun Mar 29 19:56:00 GMT 2009
Richard Guenther wrote:
> I think CSE added/removed by either canoncial form is less important
> than things like SCEV analysis being unaffected and IVOPTs still
> creating proper induction variables on the tree level.
>
> Of course a canonical form should minimize the number of operations,
> so folding i * 4 + j * 4 to (i + j) * 4 should still be done. But
> folding i * 4 + j * 2 to (i * 2 + j) * 2 and not i * 4 + 4 to (i + 1) * 4
> looks strange.
>
> I have been resistant to change this canonicalization simply because
> the current one seems to work well with the tree loop optimizers and
> date-dependence analysis nowadays, thus also my hint at doing
> such change during stage1 instead of stage4 (after all this "problem"
> now exists since 4.1 ...?)
>
> Implementing the change should be straight-forward (we should
> make sure the tree reassociation pass agrees with it).
So, how do we proceed? IMO the canonical form should be that addition
of a constant is always the outermost operation. That seems to be what
the EXPAND_SUM machinery expects, and what extract_muldiv wants to do.
It's also IMO most likely to be helpful when generating addressing modes.
The patch below should do that, but unfortunately:
+FAIL: gcc.dg/vect/vect-103.c scan-tree-dump-times vect "dependence
distance modulo vf == 0" 1
+FAIL: gcc.dg/vect/no-vfa-vect-102.c scan-tree-dump-times vect "possible
dependence between data-refs" 1
I'm not really familiar with the vectorizer.
Still - would someone like to benchmark this patch on i686-linux, maybe
with a SPEC run? I don't have that available.
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fc-fix.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090329/5ed0a885/attachment.ksh>
More information about the Gcc-patches
mailing list