[LLVMdev] Slow jitter.
Óscar Fuentes
ofv at wanadoo.es
Tue Aug 25 16:58:39 PDT 2009
Eli Friedman <eli.friedman at gmail.com> writes:
> 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 kind of metric this is? How string manipulation and I/O are a
better indication than the number of llvm assembly lines generated or
the ratio (llvm IR generation time / native code generation time)?
> What optimization level are you using for code
> generation?
As explained on the original post, there are no optimizations
whatsoever.
After reading Chris' message, my only hope is to disable the non-linear
stuff and still get decent native code.
--
Óscar
More information about the llvm-dev
mailing list