[Mono-devel-list] [PATCH] Opcode decomposition

Ben Maurer bmaurer at users.sourceforge.net
Thu Apr 1 17:07:08 EST 2004


Hello,

While doing some hacking on the jit, I noticed that some complex opcodes
such as strlen and cee_ldlen are being decomposed in the inssel.brg
file. This had a side effect that more advanced optimizations in the
burg file would be missed. For example, for the code:

if (str.Length > 10)

we would emit:

mov eax, [string + length_offset]
cmp eax,10

when we could emit

cmp [string + length_offset], 10

The attached patch moves the decomposition from the burg file into
decompose_foreach, which allows the burg file to see the true meaning of
these opcodes, and thus apply better optimizations.

For legalities sake:
This patch is submitted under the MIT/X11 License.

-- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini-opcode-decomp.patch
Type: text/x-patch
Size: 4347 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040401/7d334016/attachment.bin 


More information about the Mono-devel-list mailing list