Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by DannyBee on Thursday October 03, 2013 @12:47PM
(#6490186)
Could you explain what you mean by
" This is his way to bring gcc into the modern era" and "He's seriously invested in cleaning up gcc and making it a competitive compiler."
Optimization wise, GCC is still much more modern than LLVM, and in fact, more modern than a most commercial compilers.
Architecture wise, there are warts, but bringing GCC into the modern era architecturally was never a technical/engineering challenge.
To be honest, speaking as a guy who wrote plenty of GCC's current optimizations, he'd be a lot better off fixing LLVM's JIT issues than trying to rearchitect GCC.
At this point, it's hard to come up with good reasons to continue work on GCC past "fun".
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by iskander on Thursday October 03, 2013 @04:17PM
(#6491699)
I work on a runtime compiler with LLVM and gcc backends. LLVM presents me with a nice API to generate its IR in memory. For gcc, I actually write out a ".c" file and then invoke gcc to compile it into a shared library, which I load with dlopen. It works, but it's messy and I would prefer to work with an API like LLVM's. This project is exactly what I've been looking for.
http://dmalcolm.fedorapeople.org/gcc/global-state/
He's seriously invested in cleaning up gcc and making it a competitive compiler.
You should also see the API he has for JITing, it's much higher-level than LLVM:
https://github.com/davidmalcolm/jittest/blob/master/regvm.cc...