news.volyx.in

CS 6120: Advanced Compilers: The Self-Guided Online Course (2020) (cs.cornell.edu)

454 points by ibobev · 71 days ago · 61 comments on HN

Article summary

The article presents a self-guided online course on advanced compilers, CS 6120, which covers topics such as intermediate representations, data flow, and optimizations. The course is based on a PhD-level Cornell CS course and includes reading papers and open-source hacking tasks using LLVM and an educational IR. The course is designed to be completed at the student's own pace, with a suggested timeline of lessons and implementation tasks. The course materials, including videos and written notes, are available online.

Main themes

  • Compiler design
  • Optimization techniques
  • Programming language implementation
  • Computer science education
  • Tracing compilation

What commenters say

  • Tracing compilation is a dead end and has been abandoned repeatedly due to its limitations in handling branchy code and diverse programs.
  • Tracing compilation can be effective in specific domains, such as numerical computing, where programs have well-behaved control flow.
  • The course's focus on academic papers and research topics makes it advanced, despite covering some introductory topics in compilers.
  • A first compiler course should focus on practical aspects, such as writing a lexer and recursive descent parser, rather than optimizing compilers.
  • Optimizing compilers can waste time optimizing code that can't or needn't be optimized, and may even regress due to small changes in the source code.
  • Some argue that tracing compilation is not a dead end and has been successfully used in production environments, such as in LuaJIT.
  • The course's coverage of topics such as dead code elimination, data flow, and SSA form is considered basic for a backend compiler.
  • Advanced compiler topics, such as polyhedral optimization and vectorization, are not necessarily required for a good modern compiler.