Compiler Basics: LLVM
Previously in compiler basics:
Compiler basics (1): lisp to assembly
Compiler basics (2): user-defined functions and variables
In this post we’ll extend the compiler to emit LLVM IR as an option instead of x86 assembly. In particular, we want a local-manager ( ) with four functions:
It is important to track and map user variables into safe names so we don’t accidentally conflict between variable names used by the user and names used by the compiler itself. This function is a very simple lookup to return the safe name for a user variable.
Source: notes.eatonphil.com