Trends in Functional Programming, Volume 6 By M. Eekelen
Intellect 2007 | ISBN-10: 184150176X | 240 Pages | PDF | 1,8 MB
Intellect 2007 | ISBN-10: 184150176X | 240 Pages | PDF | 1,8 MB
Compiler writers often face a choice between implementing a simple, non-optimizing transformation pass that generates poor code which will require subsequent optimization, and implementing a complex, optimizing transformation pass that avoids generating poor code in the first place. A two-pass strategy is compelling because it is simpler to implement correctly, but its disadvantage is that the intermediate data structures can be large and traversing them unnecessarily can be costly. In a system performing just-in-time compilation or run-time code generation, the costs associated with a two-pass compilation strategy can render it impractical. A one-pass optimizing transformation is compelling because it avoids generating intermediate data structures requiring further optimization, but its disadvantage is that the transformation is more difficult to implement.