Would someone help me add an LLVM backend to my QBE-based compiler?

0
2
Asked By MellowCedar42 On

I'm building a compiled programming language, likely using D or C for the compiler. The language may have an unusual design because it's mainly inspired by D. I'm planning to start with QBE as the backend, but I'm wondering whether someone might be willing to implement or help with an LLVM backend since I'm not eager to integrate LLVM myself. If nobody helps, I'll continue with QBE and learn LLVM later.

2 Answers

Answered By CopperKite29 On

Tools such as ChatGPT or Claude can help generate starter code and explain parts of the LLVM API, but they won’t replace understanding the backend. Generated compiler code can contain subtle bugs, so you’d still need to test it thoroughly and verify that it matches your language’s semantics.

MellowCedar42 -

I’d rather not depend on AI for the backend. I’m hoping the QBE implementation will be more reliable, and I can learn LLVM properly when I’m ready.

Answered By BrightOtter7 On

You’ll probably need to learn the basics of LLVM yourself, or at least understand enough to review and maintain any contribution. A backend is tightly connected to your language’s type system, calling conventions, runtime, and optimization needs, so it’s unlikely that someone can add it correctly without working closely with you.

MellowCedar42 -

That makes sense. If nobody steps in, I’ll keep working with QBE for now and study LLVM later.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.