Once the front end has done its work its time for the back end components to take over.
This is the fifth in our compiler series and the first on the back end. We covered the parts of the compiler that are called the front end in these posts:
- LLVM Everywhere
- Compilers 101 – Overview and Lexer
- Compilers 102 – Parser
- Compilers 103 – Semantic Analyzer
- Compilers 104 – IR Generation
Back End
The components of the back end take the IR that was generated by the last step of the front end and emit executable code, which is machine language in the case of Xojo.
To recap a bit from the LLVM post, for 32-bit x86 apps, Xojo uses its own in-house, proprietary compiler first created in 2004/2005. This powerful and fast compiler handles the front end and back end, but it does have a couple limitations: it can only target 32-bit x86 and it does not do any optimizations.
Today when you build an iOS app, a 64-bit app for Windows, MacOS or Linux, or an ARM app for Raspberry Pi you are using LLVM as the back end to generate your native, binary code.
The rest of these posts will cover the back end as it pertains to LLVM. Specifically, the components are: