Reason behind this question is that often I have to JIt code like this:
Y=array1[array2[X]];
You can compile it like:
GPVar TMP(c.newGP(AsmJit::VARIABLE_TYPE_GPD));
c.mov(TMP, dword_ptr_abs(array2, X, 2));
c.mov(Y, dword_ptr_abs(array1, TMP, 2));
or
c.mov(Y, dword_ptr_abs(array2, X, 2));
c.mov(Y, dword_ptr_abs(array1, Y, 2));
Second solution is a bit ugly, but at the moment it probably has better performance as it uses less registers. But if the compiler knew that it can use the same register for both Y and TMP, then both solution will be equal in performance.
p.
Dňa streda, 18. decembra 2013 23:00:54 UTC+1 petr kobalicek napísal(-a):