This is the mail archive of the
`gcc-patches@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

Other format: | [Raw text] |

*From*: Bradley Lucier <lucier at math dot purdue dot edu>*To*: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org*Cc*: Bradley Lucier <lucier at math dot purdue dot edu>, Roger Sayle <roger at eyesopen dot com>, fjahanian at apple dot com*Date*: Thu, 25 Mar 2004 21:41:13 -0500*Subject*: Re: PATCH - [tree-ssa] regrouping of expression tree for single multiply add.

My vote, at least right now, would be to add -fassociative-math to mean that gcc is permitted to reassociate math expressions at will, regardless of the presence of parentheses. And -ffast-math should imply -fassociative-math. That is, with -ffast-math, (a+b)+c may be evaluated as a+(b+c).

I would like to second that suggestion, not because -fassociative-math is a particularly bad option for many algorithms, but that it's a particularly *benign* option for many programs. For example, the usual error analysis for numerical linear algebra programs does not depend on the order that the additions are performed in; and Colin Percival's beautiful analysis of the FFT using floating point arithmetic is not invalidated by re-association (while it depends critically on the accuracy of the sin/cos computations used).

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |