Intermediate Representation
How language-independent IRs are built so they are easy to analyse and transform.
- SSA form and phi nodes
- Control-flow graphs and dominator trees
- Keeping type and borrow information through the IR
Four layers of the compiler I am reading about and trying to understand. What I learn goes on the blog, with sources. “Research” here means a learner’s reading list, not lab work.
How language-independent IRs are built so they are easy to analyse and transform.
How loop, memory and data-flow transforms make code faster and smaller.
How IR gets lowered to the CPU through instruction selection, register allocation and scheduling.
How bugs and undefined behaviour can be found without running the program.
No rush; every topic goes through these four small steps.
I start from a source: a book, a paper or official docs.
I write a tiny example to see it for myself.
I compare what I understood with the source and fix my mistakes.
I write it up on the blog with sources, in case it helps someone else.