4 ms·
Written in C++ from the ground up, with a modular, first-class SSA IR-based interface. LLVM IR is a great accomplishment, but the design of Clang causes tremen
by SubjectToChange 3y ago
Written in C++ from the ground up, with a modular, first-class SSA IR-based interface.
LLVM IR is a great accomplishment, but the design of Clang causes tremendous pain. In particular, the lack of any higher level IR(s) in Clang result in tremendous complexity, poorer diagnostics, and missed performance optimizations. Moreover, while initiatives like ClangIR[1] may exist, the fact is that a transition to MLIR will be long and messy, to say the least. Indeed, such a transition would likely involve the complete duplication of Clang internals while downstream implementations migrate. In comparison an implementation like GCC is free to define and modify new IRs as needed, e.g. GIMPLE has three major forms IIRC.
[1]: https://llvm.github.io/clangir// https://llvm.github.io/clangir//