Rewriting Strategies for Instruction Selection
Instruction selection (mapping IR trees to machine instructions) can be expressed by means of rewrite rules. Typically, such sets of rewrite rules are highly ambiguous. Therefore, standard rewriting engines based on fixed, exhaustive strategies are not appropriate for the execution of instruction selection. Code generator generators use special purpose implementations employing dynamic programming. In this paper we show how rewriting strategies for instruction selection can be encoded concisely in Stratego, a language for program transformation based on the paradigm of programmable rewriting strategies. This embedding obviates the need for a language dedicated to code generation, and makes it easy to combine code generation with other optimizations.
- A. V. Aho, M. Ganapathi, and S. W. K. Tjiang. Code generation using tree pattern matching and dynamic programming. ACM Transactions on Programming Languages and Systems, 11(4):491–516, October 1989.
- A. V. Aho and S. C. Johnson. Optimimal code generation for expression trees. Journal of the ACM, 23(3):488–501, 1976. CrossRef
- A. W. Appel. Modern Compiler Implementation in ML. Cambridge University Press, 1998.
- A. van Deursen, J. Heering, and P. Klint, editors. Language Prototyping. An Algebraic Specification Approach, volume 5 of AMAST Series in Computing. World Scientific, Singapore, September 1996.
- H. Emmelmann, F.-W. Schroer, and R. Landwehr. BEG-a generator for efficient back ends. In ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation (PLDI’89), pages 227–237. ACM, July 1989.
- C. H. Hoffmann and M. J. O’Donnell. Pattern matching in trees. Journal of the ACM, 29(1):68–95, January 1982.
- P. Johann and E. Visser. Fusing logic and control with local transformations: An example optimization. In B. Gramlich and S. Lucas, editors, Workshop on Reduction Strategies in Rewriting and Programming (WRS’01), volume 57 of Electronic Notes in Theoretical Computer Science, Utrecht, The Netherlands, May 2001. El-sevier Science Publishers.
- T. A. Proebsting. BURS automata generation. ACM Transactions on Programming Languages and Systems, 17(3):461–486, May 1995.
- E. Visser. Scoped dynamic rewrite rules. In M. van den Brand and R. Verma, editors, Rule Based Programming (RULE’01), volume 59/4 of Electronic Notes in Theoretical Computer Science. Elsevier Science Publishers, September 2001.
- E. Visser. Stratego: A language for program transformation based on rewriting strategies. System description of Stratego 0.5. In A. Middeldorp, editor, Rewriting Techniques and Applications (RTA’ 01), volume 2051 of Lecture Notes in Computer Science, pages 357–361. Springer-Verlag, May 2001. CrossRef
- E. Visser, Z.-e.-A. Benaissa, and A. Tolmach. Building program optimizers with rewriting strategies. In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP’98), pages 13–26. ACM Press, September 1998.
- Rewriting Strategies for Instruction Selection
- Book Title
- Rewriting Techniques and Applications
- Book Subtitle
- 13th International Conference, RTA 2002 Copenhagen, Denmark, July 22–24, 2002 Proceedings
- pp 237-251
- Print ISBN
- Online ISBN
- Series Title
- Lecture Notes in Computer Science
- Series Volume
- Series ISSN
- Springer Berlin Heidelberg
- Copyright Holder
- Springer-Verlag Berlin Heidelberg
- Additional Links
- Industry Sectors
- eBook Packages
To view the rest of this content please follow the download PDF link above.