dolphin-emu/dolphin — pull request #927 by FioraAeterna (2014-09-01 07:34:38+00:00)
Title: WIP: Fiora's Faster MMU Project

The most important changes to look at here are:

"JIT: support paired load/store with MMU on": this gets rid of a huge source of interpreter fallbacks, though it could use some improvement.

"JIT memcheck: don't flush register state unless an exception occurs": this avoids constantly flushing the register cache on every single load/store when MMU is on.

"JIT: add "far code emitter" to reduce L1I cache pressure": the real meat of this change. Kind of a total hack at this point, but it **makes Rogue Squadron 2 almost twice as fast** (no I'm not making this up) and Spiderman 2 ~30% faster (going by JMC47's numbers). The basic idea here is to put all rarely-used code branches in a far code chunk, to avoid polluting the cache with enormous amounts of junk and causing cache pressure.

This is kind of a hack: it makes no attempt to free old code blocks or anything like that, and I really have *no clue* what the "right" way to do this is; I barely even understand the basics of the inheritance structure going on here. I'm really hoping someone will step in here and say "oh Fiora, this is how you're supposed to do that" and then things will make sense <_<;

"JIT: use far code emitter in more places" is just an extension of the above.