Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by rayiner on Thursday October 03, 2013 @10:49AM
(#6489248)
That's not actually true, at least with regards to LLVM. The vast majority of the time in LLVM is spent in instruction selection. LLVM spends a lot of time on instruction selection/legalization, which you can't just turn off.
[ Parent
| on HN ]
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by pcwalton on Thursday October 03, 2013 @11:24AM
(#6489527)
Well, you can use FastISel, which is way way faster (it's a simple non-pattern-matching instruction emitter, like the Plan 9 compilers).
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by foobarbazqux on Thursday October 03, 2013 @11:02AM
(#6489361)
But you can't turn off codegen in a JIT compiler either, unless you're interpreting code, so that requirement doesn't fundamentally make GCC and LLVM impractical. It sounds like LLVM either doesn't have very many optimizations or their backend needs work.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by rayiner on Thursday October 03, 2013 @11:05AM
(#6489388)
LLVM's instruction selection/legalization infrastructure is very sophisticated, very generic, table-driven, etc. Most JIT compilers use more ad-hoc and quicker mechanisms to get machine code out of IR.
Re:Libgccjit.so: an embeddable JIT-compiler based on GCC
by foobarbazqux on Thursday October 03, 2013 @11:33AM
(#6489620)
Yeah okay. Someone else pointed out FastISel.cpp. It's probably true that prettiness competes with performance.