← 返回日报
精读 预计 3 分钟

Advanced Compilers: The Self-Guided Online Course

摘要

这是 CS 6120(Advanced Compilers)的自学在线课程页面,由 Cornell 的 Adrian Sampson 设计,面向编译器与编程语言实现的进阶学习。课程以线性 lesson 组织,每一节结合视频、阅读论文和开放式编程任务,使用 LLVM 和专门设计的教学 IR(Bril)进行实践。 内容覆盖从基础的程序表示、局部/全局数据流分析、SSA,到 LLVM pass 编写、循环优化、跨过程分析、别名分析与内存管理,再到动态编译器、JIT、并行与并发优化等研究型主题,并穿插多篇经典论文阅读。 自学版本与正式课程的区别包括没有截止日期、无法参与讨论区,以及用“改变世界的编译器项目”替代期末项目。整体结构强调通过读论文 + 动手实现优化与分析来理解编译器核心技术。

荐读理由

把课程里的 IR 设计与 LLVM pass 思路拆出来,可以直接用于自己在 AI 工程里设计代码生成或执行链路时的优化与改写机制,比如用数据流分析和 SSA 思想改造中间表示以支持后续优化与转换

原文

CS 6120: Advanced Compilers: The Self-Guided Online Course

CS 6120 is a PhD-level Cornell CS course by Adrian Sampson on programming language implementation. It covers universal compilers topics like intermediate representations, data flow, and “classic” optimizations as well as more research-flavored topics such as parallelization, just-in-time compilation, and garbage collection. The work consists of reading papers and open-source hacking tasks, which use LLVM and an educational IR invented just for this class.

This page lists the curriculum for following this course at the university of your imagination, for four imagination credits (ungraded). There’s a linear timeline of lessons interspersed with papers to read. Each lesson has videos and written notes, and some have implementation tasks for you to complete. Tasks are all open-ended, to one degree or another, and are meant to solidify your understanding of the abstract concepts by turning them into real code. The order represents a suggested interleaving of video-watching and paper-reading.

Some differences with the “real” CS 6120 are that you can ignore the task deadlines and you can’t participate in our discussion threads on Zulip. Real 6120 also has an end-of-semester course project—in the self-guided version, your end-of-semester assignment is to change the world through the magic of compilers.

The instructor is a video production neophyte, so please excuse the production values, especially in the early lessons. CS 6120 is open source and on GitHub, so please file bugs if you find problems.

When you finish the course, please fill out this feedback form.

Lesson 1: Welcome & Overview

Lesson 2: Representing Programs

Lesson 3: Local Analysis & Optimization

Lesson 4: Data Flow

Lesson 5: Global Analysis

Lesson 6: Static Single Assignment

Lesson 7: LLVM

Lesson 8: Loop Optimization

Lesson 9: Interprocedural Analysis

Lesson 10: Alias Analysis

Lesson 11: Memory Management

Lesson 12: Dynamic Compilers

Lesson 13: Concurrency & Parallelism

Lesson 14: Fast Compilers

Hacker News · 163 赞 · 16 评 讨论 → 阅读原文 →

这条对你有帮助吗?