On Wed, 23 Jun 2010, Richard Guenther wrote:
PAREN_EXPR is supposed to act as re-association barrier only.
So techincally for t = a*b; f = t+c; we could emit t = (a*b); f = (t+c);
so the middle-end would see ((a*b)+c) which we could avoid to
contract based on the parens.
I'd expect that f = a*b+c; would be expanded to exactly the same t =
(a*b); f = (t+c); GIMPLE, given that no reassociation is permitted in C99;
certainly f=a*b*c; would be expanded in a way that reflects that this is
(a*b)*c and no reassociation is permitted.
With my notion of contracting only within the front
end when a conforming state of contracting is set (there would also be a
"fast" state permitting the present contracting outside of source
expressions, I suppose), this would actually be quite an easy pragma to
implement (modulo the changes for supporting ternary GIMPLE statements
everywhere) since only the front end would need to know about it; there
would be no need to attach pragma states to individual operations through
the optimizers as there would be for the other floating-point pragmas.