Preparing for Compiler Design as a Career
Below topics are generally expected for a Compiler Design job interview. Below content can get you through most of Compiler Design Interviews.
Good C++ programming skills
Data structures and algorithms
Computer architecture and tools basics
- http://www.bottomupcs.com/ ( something on the lines of chapters: 3, 7, 8, 9)
- https://www.cse.iitd.ac.in/~srsarangi/archbooksoft.html
Compilers basics
Compilers (Complete at least one of the below)
- Compilers: Theory and Practice (Compilers basics)
- Compilers from Stanford School of Engineering
You can ignore front-end part (lexical analysis and parsing). It’s mostly not useful to us
Try to understand what is intermediate representation, what are basic blocks and control flow graphs, how they are used for optimization etc
Some details about register allocation
How compiler generates code for function calls (like prolog, epilog etc)
How is runtime stack maintained (like local variables, arguments etc go on to the stack, how activation record is created for each function call)
Some resources
- https://www.youtube.com/playlist?list=PLf3ZkSCyj1tf3rPAkOKY5hUzDrDoekAc7 (Module 46, 47, 48, 68, 69, 70)
- https://nptel.ac.in/courses/106/105/106105190/ (From around 7:40 from lecture 46 to lecture 49)
- https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c11/c11s2/ (11.2.1 to 11.2.6)
- https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c12/c12s2/ (12.2.1 to 12.2.6)
Assembler/linker/debugger basics
- ACM Summer School on Compiler Design and Construction,2019 - Pune
- Watch 8 part video on program execution environment
- Dynamic linking (differences with static linking, advantages etc)
- How debuggers work
For Deep Dive and exhaustive list to learn Compiler Design as career refer to this link.