[LLVMdev] Slow jitter.

Eli Friedman eli.friedman at gmail.com
Tue Aug 25 16:15:38 PDT 2009


On Wed, Aug 26, 2009 at 1:10 AM, Óscar Fuentes<ofv at wanadoo.es> wrote:
> 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?

For comparison, how long does it take to write the whole thing out as
native assembler?  What optimization level are you using for code
generation?

-Eli




More information about the llvm-dev mailing list