This is the mail archive of the gcc@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]

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 :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]