|
From: Filipe C. <fi...@gm...> - 2008-04-28 13:37:00
|
Hi On 4 Apr, 2008, at 00:49, Filipe Cabecinhas wrote: > The optimization is: > add a slot in the ISelEnv structure to keep track of the last stored > IP in the current basic block > when a PUT(IP) is encountered, behave as before but store the stored > IP (if it's an immediate) in env > when the next PUT(IP) is encountered, if we can only store a byte, a > word or a double-word, only store those bits, not the full 64 bits. I've ported this patch to powerpc with the following difference: When only the lower 16/32 bits differ, only store those bits to memory. Not with an immediate, but it still saves come instructions. To implement this, I change the IR instruction and let it continue to a normal Ist_Put. Maybe this would be better doing in the non-hardware dependent part of VEX but then there's the problem of not being able to tell if it's better to change only some bits or not, so I don't know if it's feasible. I may also refactor the x86 and amd64 patch to do the same thing so it's consistent, if you think it's better. The powerpc patch is at http://web.ist.utl.pt/~filipe.cabecinhas/patches/vex-CIA-optimization.patch If you think anything is wrong with the patch, please comment. - Filipe Cabecinhas P.S: Attached are the code expansion rates and the performance tests' results. |