TDT4205 - Compiler Construction

Topics, slides and chapters

Topic Slides Chapters
Lexical analysis 02-05 3-3.4, 3.6, 3.7, 3.9.6
Syntactic analysis 06-11 4-4.4.3, 4.4-4.8
High-level intermediate representation 06-11 5-5.4
Low-level intermediate representation 16-17 6.2, 6.4, 6.6, 6.8, 6.9
Target machine architecture 18-21 7-7.4, 8-8.3
Dataflow analysis 22-28 8.4-9.6
Analysis applications 29-31 8.8, 8.9

Compilers Principles, Techniques, & Tools (Second Edition)

TOC

  1. Introduction*
  2. A Simple Syntax-Directed Translator*
  3. Lexical Analysis
    • 3.1 The Role of the Lexical Analyzer
    • 3.2 Input Buffering
    • 3.3 Specification of Tokens
    • 3.4 Recognition of Tokens
    • 3.6 Finite Automata
    • 3.7 From Regular Expressions to Automata
    • 3.9.6 Minimizing the Number of States of a DFA
  4. Syntax Analysis
    • 4.1 Introduction
    • 4.2 Context-Free Grammars
    • 4.3 Writing a Grammar
    • 4.4 Top-Down Parsing
    • 4.5 Bottom-Up Parsing
    • 4.6 Introduction to LR Parsing: Simple LR
    • 4.7 More Powerful LR Parsers
    • 4.8 Using Ambigous Grammars
  5. Syntax-Directed Translation
    • 5.1 Syntax-Directed Definitions
    • 5.2 Evaluation Orders for SDD's
    • 5.3 Applications of Syntax-Directed Translation
    • 5.4 Syntax-Directed Translation Schemes
  6. Intermediate-Code Generation
    • 6.2 Three-Address Code
    • 6.4 Translation of Expressions
    • 6.6 Control Flow
    • 6.8 Switch-Statements
    • 6.9 Intermediate Code for Procedures
  7. Run-Time Environments
    • 7.1 Storage Organization
    • 7.2 Stack Allocation of Space
    • 7.3 Access to Nonlocal Data on the Stack
    • 7.4 Heap Management
  8. Code Generation
    • 8.1 Issues in the Design of a Code Generator
    • 8.2 The Target Language
    • 8.3 Addresses in the Target Code
    • 8.4 Basic Blocks and Flow Graphs
    • 8.5 Optimizations of Basic Blocks
    • 8.6 A Simple Code Generator
    • 8.7 Peephole Optimization
    • 8.8 Register Allication and Assignment
    • 8.9 Instruction Selection by Tree Rewriting
    • 8.10 Optimal Code Generation for Expression
    • 8.11 Dynamic Programming Code-Generation
  9. Machine-Independent Optimizations
    • 9.1 The Principal Sources of Optimization
    • 9.2 Introduction to Data-Flow Analysis
    • 9.3 Foundations of Data-Flow Analysis
    • 9.4 Constant Propagation
    • 9.5 Partial-Redundancy Elimination
    • 9.6 Loops in Flow Graphs
  10. Instruction-Level Parallelism*
  11. Optimizing for Parallelism and Locality*
  12. Interprocedural Analysis*

*Not part of the TDT4205 curriculum