1 year ago
I stumbled upon Odin earlier this week and watched some of the videos.
Kudos on the great work so far.
You mention getting rid of LLVM and using a custom backend eventually, and just wanted to mention a backend called QBE (Quarrelsome Backend) that I stumbled upon not too long ago.
From the creator:
QBE aims to be a pure C embeddable backend that provides 70% of the performance of advanced compilers in 10% of the code. Its small size serves both its aspirations of correctness and our ability to understand, fix, and improve it. It also serves its users by providing trivial integration and great flexibility.
I'm just learning about compiler construction so some of these bullets don't mean much to me right now, but maybe they do to you.
The website: https://c9x.me/compile/
And comparison of QBE with LLVM: https://c9x.me/compile/doc/llvm.html
Best of luck!
I am ginger thus have no soul.
1 year ago
Welcome to the forums, Cloutiy.
I have considered QBE, however my biggest complaint with it is the lack of Windows support. Otherwise, I think I would give it a go.
I am currently making a custom SSA backend as I also want the ability to interpret that intermediate language for the metaprogramming stage. With that requirement in mind, there doesn't seem to be any available option that I can find.
A custom backend does have the advantage that it understands the type system of the language and allowing for things that are specific for this language: e.g. such as reserving a register for a particular use, continuous copying stack frames, etc.
Thank you for your interest in Odin,