[LLVMdev] Would DosBox benefit from LLVM JIT? (original) (raw)

Jacek Wielemborek d33tah at gmail.com
Wed Jul 22 06:36:36 PDT 2015


W dniu 22.07.2015 o 15:21, David Chisnall pisze:

A sequence of 32 instruction is not very likely to have many optimisation opportunities that LLVM can take advantage of.

I don't know the codebase, but perhaps it's as easy as increasing the number here and maybe adjusting some relevant buffers:

https://github.com/wjp/dosbox/blob/idados/src/cpu/core_dynrec.cpp#L212

You may get a speedup from longer traces, though of course the LLVM JITing time is likely to be longer, so you’d want to make sure that it’s done in a separate thread. If you can get longer traces (and DOSBox has the infrastructure already for invalidating on self-modifying code) then you may be able to get some speedup.

Introducing another thread sounds like a difficult task, though it definitely makes sense and could be worth it, though...

There was a similar project to use LLVM in QEMU a few years ago that failed to provide a speedup.

David

Why did it fail?

-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150722/177b8c38/attachment.sig>



More information about the llvm-dev mailing list