This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: dewar at gnat dot com
- To: rth at redhat dot com, toon at moene dot indiv dot nluug dot nl
- Cc: dnovillo at redhat dot com, gcc at gcc dot gnu dot org, jsm28 at cam dot ac dot uk
- Date: Wed, 2 Jan 2002 18:56:12 -0500 (EST)
- Subject: Re: SIMPLE: A language-independent tree IR
<<that under Diego's proposal, the back-end would be free to re-order this
as
tmp = A + B
Z = tmp + C
>>
If these are integer variables, then there is no reason to shudder, since for
twos complement arithmetic without overflow detection, this is a permitted
transformation. Remember that, like ALL rules in ALL languages, semantic
rules are as-if rules, the rule that says that you cannot reassociate says
that you cannot do any reassociation that would not be equivalent in results
to not reassociating.
Now if these are floating-point, then the reassociation is dubious in any case
since it definitely changes the meaning, regardless of the Fortran paren rule,
and we are back in the territory of discussing whether compilers are free to
diddle with floating-point code in this way (I shudder at that as you know,
but others think it is just fine :-)