[LLVMdev] Slow jitter.

Óscar Fuentes ofv at wanadoo.es
Tue Aug 25 13:40:41 PDT 2009


While compiling some sources, translating from my compiler's IR to LLVM
using the C++ API requires 2.5 seconds. If the resulting LLVM module is
dumped as LLVM assembler, the file is 240,000 lines long. Generating
LLVM code is fast.

However, generating the native code is quite slow: 33 seconds. I force
native code generation calling ExecutionEngine::getPointerToFunction for
each function on the module.

This is on x86/Windows/MinGW. The only pass is TargetData, so no fancy
optimizations.

I don't think that a static compiler (llvm-gcc, for instance) needs so
much time for generating unoptimized native code for a similarly sized
module. Is there something special about the JIT that makes it so slow?

-- 
Óscar




More information about the llvm-dev mailing list