ABSTRACT
We extend the tree parsing approach to code selection to DAGs. In general, our extension does not produce the optimal code selection for all DAGs (this problem would be NP-complete), but for certain code selection grammars, it does. We present a method for checking whether a code selection grammar belongs to this set of DAG-optimal grammars, and use this method to check code selection grammars adapted from lcc: the grammars for the MIPS and SPARC architectures are DAG-optimal, and the code selection grammar for the 386 architecture is almost DAG-optimal.
- BDB90.A. Balachandran, D. M. Dhamdhere, and S. Biswas. Efficient retargetable code generation using bottom-up tree pattern matching. Computer Languages, 15(3):127-140, 1990. Google ScholarDigital Library
- BE91.John Boyland and Helmut Emmelmann. Discussion: Code generator specification techniques (summary). In Robert Giegerich and Susan L. Graham, editors, Code Generation -- Concepts, Tools, Techniques, Workshops in Computing, pages 66-69. Springer, 1991.Google Scholar
- Cha87.David R. Chase. An improvement to bottomup tree pattern matching. In Fourteenth Annual A CM Symposium on Principles of Programming Languages, pages 168-177, 1987. Google ScholarDigital Library
- DF84.Jack W. Davidson and Christopher W. Fraser. Code selection through object code optimization. A CM 7~nsactions on Programming Languages and Systems, 6(4):505-526, October 1984. Google ScholarDigital Library
- EP97.M. Anton Ertl and Christian Pirker. The structure of a Forth native code compiler. In EuroForth '97 Conference Proceedings, pages 107-116, Oxford, 1997.Google Scholar
- ESL89.Helmut Emmelmann, Friedrich-Wilhelm SchrSer, and Rudolf Landwehr. BEG - a generator for efficient back ends. In SIGPLAN '89 Conference on Programming Language Design and Implementation, pages 227-237, 1989. Google ScholarDigital Library
- FH91.Christopher W. Fraser and David R. Hanson. A code generation interface for ANSI C. Software~ Practice and Experience, 21(9):963-988, September 1991. Google ScholarDigital Library
- FH95.Christopher Fraser and David Hanson. A Retargetable C compiler: Design and implementation. Benjamin/Cummings Publishing, 1995. Google ScholarDigital Library
- FHP93.Christopher W. Fraser, David R. Hanson, and Todd A. Proebsting. Engineering a simple, efficient code generator generator. A CM Letters on Programming Languages and Systems, 1993. Available from ftp: / / ft p. cs. princet on. edu/pub/ib urg. tar. Z. Google ScholarDigital Library
- Pro95.Todd A. Proebsting. BURS automata generation. A CM Transactions on Programming Languages and Systems, 17(3):461-486, May 1995. Google ScholarDigital Library
- Pro98.Todd Proebsting. Least-cost instruction selection in DAGs is NP-complete. http://research, microsoft.corn/toddpro/papers/proof.htm, 1998.Google Scholar
- PW96.Todd A. Proebsting and Benjamin R. Whaley. One-pass, optimal tree parsing- with or without trees. In Tibor GyimSthy, editor, Compiler Construction (CC'96), pages 294-308, LinkSping, 1996. Springer LNCS 1060. Google ScholarDigital Library
- Wen90.Alan L. Wendt. Fast code generation using automatically-generated decision trees. In SIG- PLAN '90 Conference on Programming Language Design and implementation, pages 9-15, 1990. Google ScholarDigital Library
Index Terms
- Optimal code selection in DAGs
Recommendations
Near-optimal instruction selection on dags
CGO '08: Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimizationInstruction selection is a key component of code generation. High quality instruction selection is of particular importance in the embedded space where complex instruction sets are common and code size is a prime concern. Although instruction selection ...
Tricolor DAGs for machine translation
ACL '94: Proceedings of the 32nd annual meeting on Association for Computational LinguisticsMachine translation (MT) has recently been formulated in terms of constraint-based knowledge representation and unification theories, but it is becoming more and more evident that it is not possible to design a practical MT system without an adequate ...
Code selection by tree series transducers
CIAA'04: Proceedings of the 9th international conference on Implementation and Application of AutomataIn this paper we model code selection by tree series transducers. We are given an intermediate representation of some compiler as well as a machine grammar with weights, which reflect the number of machine cycles of the instructions. The derivations of ...
Comments