logoalt Hacker News

MangoToupeyesterday at 1:50 PM3 repliesview on HN

I find it shocking that 20 years after LLVM was created, gcc still hasn't moved towards modularization of codegen.


Replies

1718627440yesterday at 3:28 PM

It is a political not a technical decision. Essentially the same like the Linux kernel not encouraging the use of out-of-tree kernel modules. https://gcc.gnu.org/legacy-ml/gcc/2000-01/msg00572.html

show 2 replies
pjmlpyesterday at 2:44 PM

LLVM wasn't the first modularization of codegen, see Amsterdam Compiler Kit for prior art, among others.

GCC approach is on purpose, plus even if they wanted to change, who would take the effort to make existing C, C++, Objective-C, Objective-C++, Fortran, Modula-2, Algol 68, Ada, D, and Go frontends adopt the new architecture?

Even clang with all the LLVM modularization is going to take a couple of years to move from plain LLVM IR into MLIR dialect for C based languages, https://github.com/llvm/clangir

ayendeyesterday at 1:59 PM

Isn't that very much intentional on the part of GCC?

show 3 replies