Even Clang would greatly benefit from an intermediate IR between the C/C++ AST and LLVM IR; the presentation you linked starts off by going over that (and I can confirm that it’s still a problem). That doesn’t mean that LLVM or its IR is bad, or that C or C++ are not suited to being compiled to it. It just means that some analyses and optimizations are best done at a higher level.
Re:Opinion piece on GHC back ends
by chrisseaton on Sunday September 01, 2019 @11:48AM
(#20852878)
> It just means that some analyses and optimizations are best done at a higher level.
Yes that’s my point - you can’t just emit LLVM and cross your fingers. But people keep on trying.
- Crystal is Ruby simplified in order to make it amenable to compilation by LLVM. They couldn't move LLVM to the language, so they had to move the language to LLVM.
- R's performance is very limited.
- Julia was specifically designed to be easy to compile.
- Swift has SIL - they don't just output LLVM. See what they say about LLVM! https://llvm.org/devmtg/2015-10/slides/GroffLattner-SILHighL... 'Wide abstraction gap between source and LLVM IR', 'IR isn't suitable for source-level analysis', etc. And they have these problems even with the best LLVM experts on their team!
I don't know much about MATLAB or Mathematica, sorry.