| M. L. Powell, A Portable Optimizing Compiler for Modula-2, in Proc. SIGPLAN '84 Symposium on Compiler Construction, Montreal, Canada, June 1984, pp. 310-318. |
.... can usually be generated by assuming reasonable values for the number of times the body of a loop is executed, e.g. assuming that each loop is executed five or ten times on the average (experience with compilers for traditional languages suggests that this works quite well in practice, e.g. see [20]) Based on such a strategy for estimating the execution frequency of a loop, one may use the following general approach towards applying these transformations: 1) Identify the target instructions I to be eliminated, with priority given to instructions within innermost loops. 2) If code ....
M. L. Powell, A Portable Optimizing Compiler for Modula-2, in Proc. SIGPLAN '84 Symposium on Compiler Construction, Montreal, Canada, June 1984, pp. 310-318.
....algorithm requires: for example, many CFG based algorithms use a dominator tree, while AST based algorithms do not. Finally, to show that these ideas are useful in doing even low level optimization, I will describe their implementation in the RTL System code optimizer and generator [JM91] Powell [Pow84] states that A survey of the literature on optimization uncovers many techniques that are hard to understand, harder to implement, more general than necessary, and of marginal value. I agree with this assessment, and believe that the CFG is the main cause of the first two afflictions. 2 Kicking ....
....CFGs nicely describe the arbitrary control flow that GOTOs can induce, and so all other control structures are expressed in terms of GOTO as well. Thus, the GOTO tail wags the control structure dog [Ros77] high level control structures are sacrificed for the sake of GOTOs. However, as Powell says [Pow84], The value of constructing flow graphs for languages or programs without GOTO statements (as well as the payoff from considering all the perverse possibilities in languages that do have them) is minimal. The preceding remarks concerning the hegemony of CFGs are only true in the procedural ....
[Article contains additional citation context not shown here]
Michael L. Powell. A portable optimizing compiler for Modula2. In Proceedings of the SIGPLAN '84 Symposium on Compiler Construction, SIGPLAN Notices, pages 310--318, 1984.
....optimization algorithms for these ASTs are easier to understand and implement than their CFG based counterparts. This is because the structure inherent in an AST makes unnecessary many concepts used to impose structure on CFGs, such as depth first spanning trees, dominators, and intervals. Powell [Pow84] comments that A survey of the literature on optimization uncovers many techniques that are hard to understand, harder to implement, more general than necessary, and of marginal value. I agree with this assessment, and believe that the CFG is the main cause of the first two afflictions. 1.1 ....
....optimization to them means applying closure analysis techniques to reduce a program to a procedural form, at which point their compilers generate code. They do not discuss how to perform traditional optimizations using ASTs. Thus, their point of arrival is our point of departure. As Powell says [Pow84] The value of constructing flow graphs for languages or programs without GOTO statements (as well as the payoff from considering all the perverse possibilities in languages that do have them) is minimal. One way to avoid constructing CFGs, and thus to avoid sacrificing control structures, is ....
[Article contains additional citation context not shown here]
Michael L. Powell. A portable optimizing compiler for Modula-2. In Proceedings of the SIGPLAN '84 Symposium on Compiler Construction, SIGPLAN Notices, pages 310--318, 1984.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC