Compilers

Where to start, personal recommendations

Crafting Interpreters is a best book to start. Then I suggest going through the LLVM tutorial. From there, take Advanced Compilers class from Cornell to learn about IRs and implement your own optimizations. For in-depth theory I suggest Engineering a Compiler book.

Courses

  1. Stanford Compilers CS143 by Alex Aiken, video lectures on edX
  2. Cornell CS 6120: Advanced Compilers: The Self-Guided Online Course by Adrian Sampson
  3. Compiler class by Nicolas Laurent, video lectures
  4. Compiler - Nuts and bolts of Programming Languages (2019) by Pietro Grandinetti
  5. Toolchain & pony - YouTube (2020)
  6. Dmitry Soshnikov - YouTube

Books

  1. Crafting Interpreters (2021) by Robert Nystrom
  2. Engineering a Compiler, 3rd edition (2022) by Keith Cooper, Linda Torczon
  3. Introduction to Compilers and Language Design (2021) by Douglas Thain
  4. Compiling to Assembly from Scratch (2022) by Vladimir Keleshev
  5. Writing A Compiler In Go (2020) by Thorsten Ball
  6. Basics of Compiler Design (2010) by Torben Mogensen
  7. Essentials of Compilation (2023) by Jeremy G. Siek
  8. Modern Compiler Implementation in ML (1998) by Andrew W. Appel
  9. Compiler Design in C (1990) by Allen Holub
  10. Writing a C Compiler (2023) by Nora Sandler
  11. Compilers: Principles, Techniques, and Tools (2006) by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman
  12. Practical Compiler Construction: A No-nonsense Tour through a C Compiler (2022) by Nils M Holm
  13. Programming Language Pragmatics (2015) by Michael L. Scott

Books (advanced)

  1. Types and Programming Languages (2002) by Benjamin C. Pierce
  2. SSA-based Compiler Design (2022) by Fabrice Rastello, Florent Bouchez Tichadou

Papers

  1. An Incremental Approach to Compiler Construction (2006) by Abdulaziz Ghuloum

Lecture notes

  1. Post-Modern Compiler Design (2019) by Tiark Rompf
  2. CS243 – Program Analysis and Optimizations
  3. CS343 – Advanced Topics in Compilers
  4. CS4200 | Compiler Construction from TU Delft (2021)

Study projects, toy compilers

  1. A Compiler Writing Journey (2019) by Warren Toomey
  2. GitHub - andrewrothman/SmallVM: A small virtual machine with focus on educating others about virtual machines (2012) by Andrew Rothman
  3. Introduction to Compilers (2017) by Alex Hoppen – Swift Playground giving an overview over the inner workings of modern compilers
  4. sandersn/mini-typescript: A miniature model of the Typescript compiler, intended to teach the structure of the real Typescript compiler by Nathan Shively-Sanders
  5. GitHub - SimplyDanny/bitsy-llvm: Compiler for the Bitsy language based on LLVM
  6. tyfkda/xcc: Toy C compiler for x86-64/aarch64/wasm
  7. rui314/9cc: A Small C Compiler

Recommendations and personal experience

  1. Compiler Engineer Path – Dmitry Soshnikov
  2. Recommendations // -dealloc
  3. How to learn compilers: LLVM Edition - Low Level Bits 🇺🇦
  4. Programming languages resources | Max Bernstein
  5. The Compiler Writer Resource Page
  6. The path to implementing a programming language (2023)
  7. Craig Stuntz - On Learning Compilers and Creating Programming Languages (2023)
  8. Undergrad Compilers from the Hive Mind | eschew it all (2020)

Other

  1. Virtual Machines Summer School 2016
  2. PL Pragmatics Newsletter | Slava Egorov | Substack
  3. Low-Level Software Security for Compiler Developers (2022)
  4. compilers - Compiler design | Lobsters
  5. Toolchains.net - Compiler toolchains resources

Blog posts

  1. Teaching Compilers (2020) by Dan Ghica
  2. Writing a C Compiler, Part 1 (2017) by Nora Sandler
  3. A crash course in compilers (2018) by Ramsey Nasser
  4. Teaching Compilers Backward | SIGPLAN Blog (2021) by Yotam Feldman, Mooly Sagiv
  5. An Introduction to Interpreters and JIT Compilation · Stefan-Marr.de (2023)

IR

Ask HN

  1. Ask HN: How to get a job as a compiler engineer? | Hacker News

Linkers

  1. Linkers & Loaders (1999)
  2. A ToC of the 20 part linker essay by Ian Lance Taylor
  3. Everything You Never Wanted To Know About Linker Script · mcyoung (2021)
  4. Eyes Above The Waves: Do We Really Need A Link Step? (2021)
  5. Day 34 — Linkers go brrrrr - Vinayak Mehta (2020)
  6. Beginner's Guide to Linkers (2009)

Parsers

  1. Parser Combinators From Scratch - YouTube
  2. Just write the #!%/* parser (2020)
  3. Why We Need to Know LR and Recursive Descent Parsing Techniques (2023)

YouTube

  1. Context Free - YouTube
  2. Creating a Compiler - YouTube – author implements a compiler in C++ that emits X86-64 assembly
  3. Writing a compiler in F# (video series)

Backends

Podcasts

  1. TLB hit
  2. ‎We Speak Your Language op Apple Podcasts