[Mono-devel-list] CEE_x_I4 instructions in the BURG file
bmaurer at users.sourceforge.net
Thu Apr 1 19:52:16 EST 2004
As I was hacking on the jit, I noticed that on a 32 bit platform, there
are multiple ways to do an operation such as CEE_LDIND_I4:
With the multiple ways of encoding the same instruction, we seem to be
missing alot of optimizations. For example, there are many rules such
cflags: OP_COMPARE (CEE_LDIND_I4 (OP_REGVAR), reg)
However, if you actually have
OP_COMPARE (CEE_LDIND_REF (OP_REGVAR), reg)
This optimization is not applied.
So, I was thinking that a possible solution would be to change all
aliases for integer operations into one instruction during the
decomposition phase. For example, all of the following instructions
would be changed into CEE_LDIND_I, if the jit is on a 32 bit platform:
This way, we only need to special case CEE_LDIND_I, rather than all 5
versions. Obviously, to keep 64 bit support, we would need to have rules
that handle I4, but they would not need to be as extensive.
Before I start work on this, however, I would like to hear some input
from the other jit hackers.
More information about the Mono-devel-list