Compilers: Theory and PracticeΒΆ
- Overview of Compilation
- The Subset Construction
- Left Recursion
- P1L1: Introduction to Compilers
- P1L2 - Regular Expressions And DFA
- Resources
- P1L3 - Regex NFA
- P1L4 - CFGs and Ambiguity
- P1L5 = Recursive Descent Parser
- P1L6: Top Down Parsing: LL Parsing
- Lesson 7 - P2L1 - Symantic Analysis
- Beyond Syntax
- Syntax Problems
- Attribute Grammar Example
- Attribute Grammar Part 2
- Attribute Grammar Part 3
- Attribute Grammar Example
- Attribute Grammar Other Methods
- Rules of Attribute Grammars
- Using Attribute Grammars
- Evaluation Methods
- Tree Example Inherited Attributes
- Tree Example Synthesized
- Circularity
- Circular Attribute Grammar
- Circularity The Point
- Attribute Grammar Example
- Moral of the Story
- Videos
- Slides
- P2L2: IR Code Generation
- IR Quiz
- IR Types
- Three Address Code Part 1
- Three Address Code Part 2
- Code Redundancy Quiz
- Code Generation Part 1
- Code Generation Part 2
- Code Quiz
- IR Lowering Quiz
- Lowering
- Lowering Expressions
- Lowering Expressions Part 2
- Short Circuiting
- Short Circuiting Quiz
- Helper Functions
- Short Circuiting &&
- Array Access
- Statements
- Loops Quiz
- Function Calls
- For Loop
- Translation Quiz
- Assignment
- At Leaves
- Code Shape
- Code Shape Another Example
- P2L3 - Control Flow Graphs
- P2L4 - Liveness Analysis
- Compiler Structure
- The Back End
- Control Flow Graph Revisited
- Information Flow
- IR Quiz
- Basic Blocks Quiz
- CFG Quiz
- Live Variable Analysis
- Live Range Quiz
- Computing Liveness
- Analyze Instructions
- Analyze Instructions General Rule
- Liveness Across Instructions
- Analysis Example
- Def Use Quiz
- Flow of Information
- Analyze Flow Control
- Liveness Analysis
- Control Flow Quiz
- System Of Equations
- Solving The Problem
- Analysis Example Introduction
- Analysis Example
- Generalization
- P3L1 - Register Allocation
- Full Compiler Structure
- Code Generation
- Code Generation Quiz
- Register Allocation
- Register Allocation Quiz
- Register Allocation 2
- Register Allocation Definitions
- Register Allocation Definitions 2
- Register Allocation Definitions 3
- Graph Example
- Register Allocation Defined
- Available Registers Quiz
- Webs Part 1
- Webs Part 2
- Interference
- Interference Graph
- Register Allocation and Graph Coloring
- Graph Coloring
- Graph Coloring Heuristics
- Graph Coloring Heuristics (Cont)
- Graph Coloring Quiz
- Graph Coloring - Example 5
- Graph Coloring - Example 6
- Graph Coloring Example 6 (Cont)
- Coloring Quiz
- When Coloring Fails
- Choosing A Web
- Spill Costs
- Computing Spill Costs
- Spill Cost Example
- Splitting The Web
- Splitting Example
- Splitting Heuristic
- Cost And Benefits Of Splitting
- Further Optimizations
- Register Coalescing
- Register Targeting
- Pre Splitting Webs
- Live Range Splitting Quiz
- Interprocedural Register Allocation
- P3L2 - Code Optimizations
- Optimizer Quiz
- Optimization Efforts Quiz
- Traditional Three Phase Compiler
- The Optimizer
- The Optimizer Role
- Code Redundancy Quiz
- Redundancy Elimination
- Value Numbering
- Local Value Numbering The Algorithm
- Local Value Numbering An Example Part 1
- Local Value Numbering: An Example
- Local Value Numbering Algorithm
- Extensions to Value Number
- Missed Opportunities
- LVN Quiz
- Control Flow Graph Quiz
- Optimization Scope
- The Fairy Tale
- Super Local Value Numbering A Regional Technique
- Super Local Value Numbering
- SSA Name Space
- SVN Algorithm Part 1
- SVN Algorithm Part 2
- SVN Quiz
- Instruction Selection
- Full Compiler Structure
- ISA Quiz
- Instruction Selection
- Instruction Selection Example
- Assembly Language Quiz
- IR Code Quiz
- Translations Part 1
- Translations Part 2
- Translations Instruction Costs
- X86 Idioms
- Swap Quiz
- Architecture Differences
- Minimizing Cost
- Tree Representation
- Tiles
- Tiles Part 2
- Algorithms
- Ad Hoc Algorithms
- Cost Algorithms
- Tiling Quiz
- Dynamic Programming
- Recursive Algorithm
- Code Generator Generators
- Rewrite Rules
- Rewrite Process
- Modern Processors
- P4L1 - Procedure Abstraction
- Resources
- Lectures from youtube
- Improvements
- Test 1
- Test 2
- Test 3
- Recursive Descent Parsers
- Operator grammar and Operator precedence parser
- LR parsing, LR(0) items and LR(0) parsing table
- LL(0) Parsing example and SLR(1) table
- Examples of LR(0) and SLR(1)
- Examples of LR(0) and SLR(1)
- CLR(1) and LALR(1) Parsers
- Conflicts and Examples of CLR(1) and LALR(1)
- Examples of CLR(1) and LALR(1) and and comparision of all the parsers
- Syntax Directed Translation
- Example of SDT - involving a calculation
- S attributed and L attributed definitions