Related articles |
---|
Common subexpression analysis (summary) mernst@theory.lcs.mit.edu (1992-06-26) |
permissible numerical optimizations tmb@arolla.idiap.ch (1992-07-14) |
Re: permissible numerical optimizations gorton@tallis.enet.dec.com (1992-07-16) |
Newsgroups: | comp.compilers |
From: | gorton@tallis.enet.dec.com (Richard Gorton) |
Organization: | Digital Equipment Corporation, Littleton MA |
Date: | Thu, 16 Jul 1992 13:30:44 GMT |
References: | 92-06-135 92-07-038 |
Keywords: | optimize |
tmb@arolla.idiap.ch (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
comp.compilers page.
Search the
comp.compilers archives again.