Skip to content

LLVM

LLVM IR Emission(1): Overall and Type Emission

This blog briefly introduces the LLVM IR emission practice in Piovt-Language. The pl utilizes the LLVM to generates the backend code and does optimizer with the help of LLVM passes. The emission happens during converting from AST node into the LLVM, coupled with the syntax check as well. In this blog, we focus on the conversion details between LLVM IR and AST, and by the way inspects the ways of type check in a static language.

LLVM: Control Flow and Phi Node

LLVM provides a set of APIs for you to emit the platform dependent IR, and helps to optimize the generated IR and finally produces the low level executable code.

When writing a compiler, we first need to parse the high level source code into the AST. And then, after processing the modules and type checks, it's time to start to interact with LLVM to emit the LLVM IR.

This blog records my misunderstanding during learning llvm control flow and phi node.

LLVM and GC

In this blog, I will introduce how I integrate a precise, relocation GC with LLVM using its statepoint api. We will also talk about some optimization techniques, debug support and so on.