This section has been updated for EPITA-2018 on 2015-10-06.
At the end of this stage, the compiler procudes LLVM IR code. This stage produces an intermediate representation like TC-5.
The LLVM IR is a Static Single Assignment (SSA) based representation, that provides type safety, low-level operations, and is capable of representing most of high-level languages cleanly. It is the intermediate representation used by Clang.
Compared to the HIR, LLVM IR is typed. Providing type information can help the LLVM back end to optimize even more.
You can find more information about the language in the LLVM Language Reference Manual.
For more documentation on LLVM, use the LLVM Documentation.
A relevant tutorial is available here: Kaleidoscope: Implementing a Language with LLVM. It may be useful if you want to go further.
The dependency for this stage is Clang. You can install it either of
a part of the
llvm-dev package, or by visiting
LLVM Download Page.
This stage makes use of multiple previous stages:
All the identifiers have to be unique, in order to translate them to LLVM identifiers (for debug purposes).
The desugar visitor is used to translate
for loops and comparison
|• TC-L Goals:||What this stage teaches|
|• TC-L Samples:||See TC-L work|
|• TC-L Given Code:||Explanation on the provided code|
|• TC-L Code to Write:||Explanation on what you have to write|
|• TC-L FAQ:||Questions not to ask|
|• TC-L Improvements:||Other Designs|