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...
" 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".
LLVM and gcc are optimized for producing the fastest possible code and will do so at the expense of spending more time doing it. That's not to say that they can't become great JIT compilers in the future, but I don't think we're there yet.
Production JIT compilers are the same way. For the hottest code paths, all the optimizations get turned on. The coldest ones are interpreted. The first level of jitted compilation has very few optimizations enabled.
The main thing that doesn't cooperate with JIT compilation yet is whole program analysis.
I consider that "simple", as on the scale of "engineering complexity", it would be simple, even though on the scale of "engineering time" it may take longer.
The node.js server case seems worthwhile to bring up here: node.js servers are typically run for days or weeks on end. An extra few milliseconds (or even a second or two) isn't significant if it makes a noticeable difference in performance.
A good example of where this is important is in a tracing JIT. Do you want to compile after 1000 iterations or 10,000 iterations? Faster JIT compilation means it can kick in much earlier.
The Pypy developers (another Python with JIT project) looked very, very, carefully at every available JIT out there, and finally ended up writing their own. It was the only way that they could get something that would do what they needed. The results of doing that was performance that was far superior to what the Unladen Swallow project got when using LLVM.
It sounds very simple when you look at it from a distance. "We need a JIT, here's a JIT, let's use it." Then you find out that just because something is called a "JIT" doesn't mean that it will be of any use to what you are trying to do. The subject area is very complex and there will probably never be a universal solution.
What I could see the GCC JIT mode being useful for is things like generating certain critical portions of a program under programmer direction. That is, it would make a nice library that you call to generate very optimized code for specific functions or modules. A good example is how GCC is currently called in the background by a number of Python libraries which dynamically generate C code and compile it for faster execution. Being able to do this more directly via a JIT process could be very convenient. This is perhaps the sort of application that the author has in mind.