Ch9a - 1 ! Code Generation" Part I! Chapter 8" (1st ed....

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Code Generation Part I Chapter 8 (1 st ed. Ch.9) COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 2007-2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Position of a Code Generator in the Compiler Model Front-End Code Optimizer Source program Symbol Table Lexical error Syntax error Semantic error Intermediate code Code Generator Intermediate code Target program
Background image of page 2
3 Code Generation • Code produced by compiler must be correct – Source-to-target program transformation should be semantics preserving • Code produced by compiler should be of high quality – Effective use of target machine resources – Heuristic techniques should be used to generate good but suboptimal code, because generating optimal code is undecidable
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Target Program Code • The back-end code generator of a compiler may generate different forms of code, depending on the requirements: – Absolute machine code (executable code) – Relocatable machine code (object Fles for linker) – Assembly language (facilitates debugging) – Byte code forms for interpreters (e.g. JVM)
Background image of page 4
5 The Target Machine • Implementing code generation requires thorough understanding of the target machine architecture and its instruction set
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/01/2012 for the course COP 5621 taught by Professor Vanengelen during the Spring '11 term at FSU.

Page1 / 15

Ch9a - 1 ! Code Generation" Part I! Chapter 8" (1st ed....

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online