Switching target language from LLVM-IR to C

I think I need to pivot!

What I intended originally was to write a compiler that translates from Common Lisp to LLVM IR. Well, I recently stumbled over this article, that convinced me to make my compiler target the C programming language instead of LLVM IR. There are several reasons that seem really meaningful to me. I won’t repeat all of them here – just read that article in case you are interested.

Well, what that means is of course quite some work 😉 . I will abandon the LLVM specific parts of owlisp as soon as I have replacements that translate to C.

Although that renders all of the LLVM specific stuff that I have created so far as waste, I am still confident that I will finally end up with less work, simply because C is of course more of a high level language than LLVM IR is. That should make implementation of many compilation steps easier.

However, in the end I still want to create a compiler that can make use of LLVM as a toolchain, i.e. that will invoke LLVM on the C code that owlisp generates, so the build process will hopefully be very easy to use.


Leave a Reply

Your email address will not be published. Required fields are marked *