[LLVMdev] llvm-qemu. (Was: Newbie)
John Criswell
criswell at uiuc.edu
Sun Apr 6 09:32:30 PDT 2008
Ralph Corderoy wrote:
> Hi Tilmann,
>
>
>> Nevertheless, it is unlikely that llvm-qemu will ever be much faster
>> than regular qemu (by replacing its code generator completely, which
>> it currently does), which is due to the fact that regular qemu has a
>> very lightweight code generator (it basically only copies blocks of
>> memory and performs some patching to them and only does static
>> register allocation) which generates reasonably good code, with a very
>> low overhead for compilation time. In contrast the LLVM JIT generates
>> really high quality code (in fact the JIT and the static compiler
>> share the same code generator), but at a higher price in terms of
>> compilation time.
>>
One of the things I noticed in the last message on llvm-qemu was that
you were compiling with output from qemu with llvm-gcc? Is this correct?
If so, then wouldn't that be one of the sources of overhead when using
LLVM? It would make more sense to me (but also be more implementation
work) to link the LLVM JIT and CodeGen libraries directly into Qemu and
to forgo the Qemu->C->LLVM translation process. Not only should this
speed it up (because you're removing the C preprocessing, C parsing, and
exeve() overhead), but it should also give you more control over what
LLVM is doing (you can use LLVM's JIT infrastructure to re-codegen
functions at run-time and things like that).
-- John T.
>
> How about storing generated code on disc? Or the intermediate IR? I'd
> typically use the same things under qemu day after day and would be
> happy to slowly build up a cache on disc. Perhaps starting qemu with a
> 'spend time and add to cache' option when I'm getting it to learn and a
> 'use only what's in the cache already' when I having got the time to
> wait.
>
> Cheers,
>
>
> Ralph.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list