Compiler Design and Optimization

  1. Lexical Analysis and Maximal Munch

    Tokenize by tracking the longest accepted prefix and resolve ties without breaking identifier boundaries.

    Graduate
  2. Predictive Parsing with FIRST and FOLLOW Sets

    Compute lookahead choices for nullable grammar alternatives and diagnose why two productions compete for one table entry.

    Graduate
  3. LR Items and Shift–Reduce Parsing

    Interpret a dotted production as progress through a rule and trace the parser’s choice to shift or reduce.

    Graduate
  4. Parser Recovery at Syntactic Boundaries

    Resume after a malformed statement by recovering at a token valid in the enclosing context and limit cascaded diagnostics.

    Graduate
  5. Basic Blocks and Control-Flow Graphs

    Build a control-flow graph from jump boundaries and state which exceptional exits are part of the program model.

    Graduate
  6. Dominators and Dominator Trees

    Compute which blocks every path to a program point must traverse and use immediate dominators to organize that relation.

    Graduate
  7. SSA Phi Functions at Control-Flow Joins

    Read a phi input on the predecessor edge that selected it and translate parallel phi assignments without overwriting needed values.

    Graduate
  8. Reaching Definitions as Forward Dataflow

    Identify which assignments can supply a later read and use the difference between generating and killing definitions at each statement.

    Graduate
  9. Live Variables and Backward Dataflow

    Determine which current values can still be read and use the answer to separate dead assignments from necessary ones.

    Graduate
  10. Constant Propagation and Merging Values

    Use a lattice of facts to represent a known constant, absent information from an unreachable path, and genuine disagreement.

    Graduate
  11. Sparse Conditional Constant Propagation

    Combine executable-edge discovery with SSA value facts so impossible branches do not spoil a constant at a merge.

    Graduate
  12. Dead Assignments and Observable Effects

    Delete a computation only when its result and its evaluation are both outside the program’s observable behavior.

    Graduate
  13. Value Numbering and Common Subexpressions

    Recognize two computations with the same value and check that a reusable definition dominates the second use.

    Graduate
  14. Loop-Invariant Code Motion and Safe Hoisting

    Move a computation to a loop preheader only after proving its operands stay stable and that earlier evaluation is legal.

    Graduate
  15. Strength Reduction for Induction Variables

    Replace a repeated affine computation by updates to a derived induction variable and check that the arithmetic semantics agree.

    Graduate
  16. May-Alias and Must-Alias in Compiler Analysis

    Separate possible overlap from guaranteed identity and use each answer only for the transformations it justifies.

    Graduate
  17. Register Allocation, Interference, and Spilling

    Convert overlapping live ranges into register constraints and see how spilling changes both code cost and liveness.

    Graduate
  18. Calling Conventions and Live Values Across Calls

    Track the caller’s and callee’s register obligations and relate those contracts to compiler allocation choices.

    Graduate
  19. Instruction Selection by Tree Covering

    Cover intermediate expressions with target patterns and compare legal alternatives by cost without changing arithmetic semantics.

    Graduate
  20. Compiling Pattern Matches into Decision Trees

    Share tests for constructors while preserving the first matching clause and the order of effectful guards.

    Graduate