3 ms·
Interesting project! I've written compiler frontends for both GCC and LLVM, and surprisingly found it easier to write one for GCC, despite LLVMs reputation on m
by joshumax 8y ago
Interesting project! I've written compiler frontends for both GCC and LLVM, and surprisingly found it easier to write one for GCC, despite LLVMs reputation on modularity. I'd love to hear the reasons why you chose LLVM for code generation over something else!
- thechao 8y agoIn my experience, LLVM has too much code motion for understaffed projects to seriously consider. When I’m developing small languages my goal is to reduce overall work or, barring that, keep the work constant & get some other benefit. While I always reach for c++ first, I’m under no delusion that it’s a fit language for describing easily portable, easily consumable, and stable API/ABI. For that work, C is the undisputed grand champion. As such, I generally just translate to C. With the vector intrinsics provided by Clang (or GCC), I can still target all the features I need.