@pikuma.com have you checked the LLVM Python repo from https://rev.ng? https://github.com/revng/llvmcpy, I was thinking about using it at the end of the compiler course to generate LLVM IR from the pinky AST
Comments
Log in with your Bluesky account to leave a comment
Oh, nice! I used numba-llvmlite to generate LLVM IR. But Pinky is dynamically typed so you might need to really define and separate ints and floats, and annotate types for functions and their returns as well.
here you have a discussion about the differences, I will probably need to do something like SSA in the variables, because in that way, every time a variable is re-defined, I could assign a new LLVM IR value. I think it can be an interesting project.
Comments