News for hackers. Stuff that matters.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by jevinskie on Thursday October 03, 2013 @10:17AM (#6489033)
LLVM understands this issue. That is why they have "regular" instruction selection passes and "fast" instruction selection passes. The JIT uses FastISel. But you are definitely right, it is not anywhere near as lightweight compared to, say, Hotspot.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by sanxiyn on Thursday October 03, 2013 @11:31AM (#6489601)
There is also an issue of FastISel not supporting the full LLVM IR, so if you depend on FastISel for fast JIT, you basically need to design LLVM IR generation around that, limiting yourself to undocumented, unspecified, and ever changing subset of LLVM IR. Which can be done, but not very pleasant.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by DannyBee on Thursday October 03, 2013 @12:47PM (#6490190)
Right, but unlike GCC, this is not an architectural issue, but a simple implementation issue that could be fixed.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by azakai on Thursday October 03, 2013 @02:16PM (#6490824)
It's an implementation issue, but it is far from simple.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by DannyBee on Friday October 04, 2013 @02:17AM (#6493978)
So I guess I disagree. There are known good solutions to this problem. Yes, it's definitely some work actually writing the code right, but it's not like this is a problem that requires engineering brand new solutions. It just requires a good engineer and some time.

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.

Re:Libgccjit.so: an embeddable JIT-compiler based on GCC by ahomescu1 on Thursday October 03, 2013 @03:49PM (#6491501)
The JIT doesn't always use FastISel. Last time I checked, you had to enable it manually, or set optimization to -O0.