On Sat, May 21, 2011 at 1:31 AM, Andreas Färber <andreas.faer...@web.de> wrote: [...] > Has anyone evaluated reusing LLVM optimization passes for TCG? Or maybe > GIMPL if there's an equivalent?
IMHO the qemu_ld/st semantics and the size of TB blocks will always limit the usefulness of more involved optimizations than what already exists in QEMU. Basically qemu_ld/st ops prevent any code change across them which make optimization opportunities rather low. Considering they always take the fast path would surely change the situation, but then the slow path would have to be able to rebuild information; certainly possible, but quite involved too :-) Once this qemu_ld/st change is done, you'll the need to get to the problem of too short TB blocks; a way to do this is to generate traces of frequently executed blocks and consider them as a single block[1]; that would open the door to many more code generation improvements. This certainly doesn't mean Kirill and Aurélien changes are not welcome, just that I think, in the current state, such changes will always have a limited impact. Laurent [1] See for instance section 2.3 of Derek Bruening's PhD thesis about DynamoRIO http://www.burningcutlery.com/derek/phd.html