Compiler Design

  1. Intermediate Code Generation
    1. Intermediate Representation Design
      1. IR Design Goals
        1. Machine Independence
          1. Optimization Facilitation
            1. Translation Simplicity
            2. IR Classification
              1. High-Level IR
                1. Medium-Level IR
                  1. Low-Level IR
                2. Three-Address Code
                  1. TAC Instruction Format
                    1. Address Types
                      1. Temporary Variable Management
                        1. TAC Instruction Types
                        2. TAC Representation Methods
                          1. Quadruples
                            1. Triples
                              1. Indirect Triples
                                1. Representation Trade-offs
                                2. Static Single Assignment Form
                                  1. SSA Properties
                                    1. Phi Functions
                                      1. SSA Construction Algorithm
                                        1. SSA Destruction
                                        2. Control Flow Representation
                                          1. Basic Blocks
                                            1. Control Flow Graphs
                                              1. Dominance Relations
                                                1. Loop Detection
                                                2. Translation Schemes
                                                  1. Syntax-Directed Translation
                                                    1. Translation Grammar
                                                      1. Action Symbol Placement
                                                      2. Expression Translation
                                                        1. Arithmetic Expressions
                                                          1. Boolean Expressions
                                                            1. Short-Circuit Evaluation
                                                              1. Array References
                                                                1. Record Field Access
                                                                2. Statement Translation
                                                                  1. Assignment Statements
                                                                    1. Conditional Statements
                                                                      1. Loop Statements
                                                                        1. Switch Statements
                                                                          1. Break and Continue Statements
                                                                          2. Procedure Call Translation
                                                                            1. Parameter Passing Mechanisms
                                                                              1. Return Value Handling
                                                                                1. Activation Record Setup
                                                                                  1. Nested Procedure Calls
                                                                                  2. Declaration Translation
                                                                                    1. Variable Declarations
                                                                                      1. Array Declarations
                                                                                        1. Record Declarations
                                                                                          1. Procedure Declarations