|Common subexpression analysis (summary) email@example.com (1992-06-26)|
|permissible numerical optimizations firstname.lastname@example.org (1992-07-14)|
|Re: permissible numerical optimizations email@example.com (1992-07-16)|
|From:||firstname.lastname@example.org (Richard Gorton)|
|Organization:||Digital Equipment Corporation, Littleton MA|
|Date:||Thu, 16 Jul 1992 13:30:44 GMT|
email@example.com (Thomas M. Breuel) writes:
>More generally, I'm curious to know: what kinds of liberties and
>prohibitions do numerical optimizers operate under in various languages
>and compilers (in particular for FORTRAN)?
>[The F77 standard allows any mathematically equivalent operation, which is
>so broad that real optimizers do much less.]
The standard says (section 6.6.4) "...the processor may evaluate any
mathematically equivalent expression, provided that the integrity of
parentheses is not violated." The standard then further elaborates
expressions, allowable, and non-allowable forms. In fact one of the
explicitly permitted transformations is: A/B/C --> A/(B*C). But the
transformation is explicitly disallowed if the original expression is
(A/B)/C. Thus, in order to legally attempt this optimization, the
[non-]existance of paretheses must be accounted for in the phase where the
optimization is occurring. A peephole optimizer attempting to [legally]
perform this transformation, based strictly on the instruction sequence,
must be able to find out if the source code had parentheses.
Richard Gorton Alpha Migration Tools - Digital Equipment Corp.
Return to the
Search the comp.compilers archives again.