[PATCH] Add PAREN_EXPR
Richard Guenther
rguenther@suse.de
Thu Feb 21 09:53:00 GMT 2008
On Wed, 20 Feb 2008, Tim Prince wrote:
> Richard Guenther wrote:
> >
> > Yeah. It's probably more for things like a-(b+c) where it doesn't matter
> > to use the equivalent a-b-c. Or other cases where parens are added
> > for syntactic reasons rather than to guard against re-association.
> Silent re-association of addition has broken many applications. It became
> popular in some circles in the time when all i386 machines used extended
> precision, and it was more often true that "it didn't matter."
> I would see some advantage in provision of an option to permit -ffast-math
> without re-association in violation of language standards. For example,
> the optimizations on division which are reserved for -ffast-math could be
> used more often, if they were not coupled with violation of parentheses.
Ok, this was my understanding as well (basically not honoring parantheses
is wrong-code generation). To make sure we do not regress too much
I have put the patch (and one followup) through Polyhedron testing
(with -ffast-math but still honoring parantheses) and the only effect
that _maybe_ is not noise is on doduc (though doduc varies quite much,
usually locally its quite stable).
See
http://www.suse.de/~gcctest/c++bench/polyhedron/polyhedron-summary.txt-2-0.html
So I have now applied the first patch (without the hunk trying to make
-fassociative-math the default) and will post the followup in a moment.
Richard.
More information about the Gcc-patches
mailing list