Skip to main content

2017 | OriginalPaper | Buchkapitel

8. Code Generation

Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The process of code generation takes the intermediate representation generated by the front-end of the compiler, with or without any optimisation performed by the machine-independent optimisation phase, and generates code for the target machine. Writing a good code generator is not easy. There is too much choice. There will be infinitely many ways of translating a piece of intermediate code to target code and there is no standard way of performing the translation. The translation process can involve many different algorithms, all interacting with each other in seemingly unpredictable ways, and ensuring that the code produced is of sufficiently high quality is something of a challenge.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Payne M, Bhandarkar D (1980) VAX floating point: a solid foundation for numerical computation. SIGARCH Comput Archit News 8(4):22–33 CrossRef Payne M, Bhandarkar D (1980) VAX floating point: a solid foundation for numerical computation. SIGARCH Comput Archit News 8(4):22–33 CrossRef
2.
Zurück zum Zitat Lindholm T, Yellin F (1997) The Java virtual machine specification. The Java series, Addison-Wesley, Reading Lindholm T, Yellin F (1997) The Java virtual machine specification. The Java series, Addison-Wesley, Reading
3.
Zurück zum Zitat Appel AW (2004) Modern compiler implementation in C. Cambridge University Press, Cambridge MATH Appel AW (2004) Modern compiler implementation in C. Cambridge University Press, Cambridge MATH
4.
Zurück zum Zitat Aho AV, Lam MS, Sethi R, Ullman JD (2007) Compilers – principles, techniques and tools, 2nd edn. Pearson Education, Upper Saddle River MATH Aho AV, Lam MS, Sethi R, Ullman JD (2007) Compilers – principles, techniques and tools, 2nd edn. Pearson Education, Upper Saddle River MATH
5.
Zurück zum Zitat Muchnick SS (1997) Advanced compiler design and implementation. Morgan Kaufmann Publishers, San Francisco Muchnick SS (1997) Advanced compiler design and implementation. Morgan Kaufmann Publishers, San Francisco
6.
Zurück zum Zitat Cooper KD, Torczon L (2011) Engineering a compiler, 2nd edn. Morgan Kaufmann, San Francisco MATH Cooper KD, Torczon L (2011) Engineering a compiler, 2nd edn. Morgan Kaufmann, San Francisco MATH
7.
Zurück zum Zitat Mittal S, Vetter JS (2015) A survey of CPU-GPU heterogeneous computing techniques. ACM Comput Surv 47(4):69:1–69:35 CrossRef Mittal S, Vetter JS (2015) A survey of CPU-GPU heterogeneous computing techniques. ACM Comput Surv 47(4):69:1–69:35 CrossRef
8.
9.
Zurück zum Zitat Davidson JW, Fraser CW (1984) Automatic generation of peephole optimizations. In: Proceedings of the ACM SIGPLAN ’84 symposium on compiler construction, Montreal, Canada, pp 111–116. Published as ACM SIGPLAN Notices 19:6 Davidson JW, Fraser CW (1984) Automatic generation of peephole optimizations. In: Proceedings of the ACM SIGPLAN ’84 symposium on compiler construction, Montreal, Canada, pp 111–116. Published as ACM SIGPLAN Notices 19:6
10.
Zurück zum Zitat Davidson JW, Fraser CW (1980) The design and application of a retargetable peephole optimizer. ACM Trans Program Lang Syst 2(2):191–202 CrossRef Davidson JW, Fraser CW (1980) The design and application of a retargetable peephole optimizer. ACM Trans Program Lang Syst 2(2):191–202 CrossRef
11.
Zurück zum Zitat Tanenbaum AS, van Staveren H, Stevenson JW (1982) Using peephole optimization on intermediate code. ACM Trans Program Lang Syst 4(1):21–36 CrossRefMATH Tanenbaum AS, van Staveren H, Stevenson JW (1982) Using peephole optimization on intermediate code. ACM Trans Program Lang Syst 4(1):21–36 CrossRefMATH
12.
Zurück zum Zitat Massalin H (1987) Superoptimizer – A look at the smallest program. In: Proceedings of the second international conference on architectural support for programming languages and operating systems (ASPLOS-II), Palo Alto, California, pp 122–126. Published as ACM SIGPLAN Notices 22:10 Massalin H (1987) Superoptimizer – A look at the smallest program. In: Proceedings of the second international conference on architectural support for programming languages and operating systems (ASPLOS-II), Palo Alto, California, pp 122–126. Published as ACM SIGPLAN Notices 22:10
13.
Zurück zum Zitat Glanville RS, Graham SL (1978) A new method for compiler code generation. In: Proceedings of the 5th annual symposium on principles of programming languages, pp 231–240 Glanville RS, Graham SL (1978) A new method for compiler code generation. In: Proceedings of the 5th annual symposium on principles of programming languages, pp 231–240
14.
Zurück zum Zitat Ganapathi M, Fischer CN (1982) Description-driven code generation using attribute grammars. In: Proceedings of the 9th annual symposium on principles of programming languages, Albuquerque, NM, pp 108–119 Ganapathi M, Fischer CN (1982) Description-driven code generation using attribute grammars. In: Proceedings of the 9th annual symposium on principles of programming languages, Albuquerque, NM, pp 108–119
15.
Zurück zum Zitat Ganapathi M, Fischer CN (1984) Attributed linear intermediate representations for retargetable code generators. Softw Pract Exp 14(4):347–364 CrossRef Ganapathi M, Fischer CN (1984) Attributed linear intermediate representations for retargetable code generators. Softw Pract Exp 14(4):347–364 CrossRef
16.
Zurück zum Zitat Ganapathi M, Fischer CN (1985) Affix grammar driven code generation. ACM Trans Program Lang Syst 7(4):560–599 CrossRef Ganapathi M, Fischer CN (1985) Affix grammar driven code generation. ACM Trans Program Lang Syst 7(4):560–599 CrossRef
17.
Zurück zum Zitat Aho AV, Ganapathi M, Tjiang SWK (1989) Code generation using tree matching and dynamic programming. ACM Trans Program Lang Syst 11(4):491–516 CrossRef Aho AV, Ganapathi M, Tjiang SWK (1989) Code generation using tree matching and dynamic programming. ACM Trans Program Lang Syst 11(4):491–516 CrossRef
18.
Zurück zum Zitat Pelegri-Llopart E, Graham SL (1988) Optimal code generation for expression trees: an application of BURS theory. In: Proceedings of the 15th annual symposium on principles of programming languages, pp 294–308 Pelegri-Llopart E, Graham SL (1988) Optimal code generation for expression trees: an application of BURS theory. In: Proceedings of the 15th annual symposium on principles of programming languages, pp 294–308
19.
Zurück zum Zitat Fraser CW, Henry RR, Proebsting TA (1992) BURG – fast optimal instruction selection and tree parsing. ACM SIGPLAN Not 27(4):68–76 CrossRef Fraser CW, Henry RR, Proebsting TA (1992) BURG – fast optimal instruction selection and tree parsing. ACM SIGPLAN Not 27(4):68–76 CrossRef
20.
Zurück zum Zitat Blindell GH (2016) Instruction selection: principles, methods, and applications. Springer, Switzerland CrossRef Blindell GH (2016) Instruction selection: principles, methods, and applications. Springer, Switzerland CrossRef
21.
Zurück zum Zitat Chaitin GJ (1982) Register allocation and spilling via graph coloring. In: Proceedings of the ACM SIGPLAN ’82 symposium on compiler construction, Boston, Mass, pp 98–105. Published as ACM SIGPLAN Notices 17:6 Chaitin GJ (1982) Register allocation and spilling via graph coloring. In: Proceedings of the ACM SIGPLAN ’82 symposium on compiler construction, Boston, Mass, pp 98–105. Published as ACM SIGPLAN Notices 17:6
22.
Zurück zum Zitat Chow FC, Hennessy JL (1990) The priority-based coloring approach to register allocation. ACM Trans Program Lang Syst 12(4):501–536 CrossRef Chow FC, Hennessy JL (1990) The priority-based coloring approach to register allocation. ACM Trans Program Lang Syst 12(4):501–536 CrossRef
23.
Zurück zum Zitat Mogensen TÆ (2011) Introduction to compiler design. Undergraduate topics in computer science. Springer, Berlin Mogensen TÆ (2011) Introduction to compiler design. Undergraduate topics in computer science. Springer, Berlin
25.
Zurück zum Zitat Sethi R (1989) Programming languages – concepts and constructs. Addison-Wesley Publishing Company, Reading MATH Sethi R (1989) Programming languages – concepts and constructs. Addison-Wesley Publishing Company, Reading MATH
27.
Zurück zum Zitat Davidson JW, Fraser CW (1984) Register allocation and exhaustive peephole optimization. Softw Pract Exp 14(9):857–865 CrossRef Davidson JW, Fraser CW (1984) Register allocation and exhaustive peephole optimization. Softw Pract Exp 14(9):857–865 CrossRef
28.
Zurück zum Zitat Granlund T, Kenner R (1992) Eliminating branches using a superoptimizer and the GNU C compiler. In: Proceedings of the ACM SIGPLAN ’92 conference on programming language design and implementation. San Francisco, California, pp 341–352, June 1992 Granlund T, Kenner R (1992) Eliminating branches using a superoptimizer and the GNU C compiler. In: Proceedings of the ACM SIGPLAN ’92 conference on programming language design and implementation. San Francisco, California, pp 341–352, June 1992
Metadaten
Titel
Code Generation
verfasst von
Des Watson
Copyright-Jahr
2017
DOI
https://doi.org/10.1007/978-3-319-52789-5_8