[Mono-bugs] [Bug 61450][Wis] New - [PATCH] use xor esi, esi to set a regvar to 0

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 12 Jul 2004 15:06:21 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=61450

--- shadow/61450	2004-07-12 15:06:21.000000000 -0400
+++ shadow/61450.tmp.28271	2004-07-12 15:06:21.000000000 -0400
@@ -0,0 +1,26 @@
+Bug#: 61450
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] use xor esi, esi to set a regvar to 0
+
+This patch uses the shorter xor esi, esi encoding when we set a regvar to
+zero. Before, we only did this as a peephole opt. The problem with this
+method is that the flow of cflags information is not clear from the
+instructions.
+
+My patch does the optimization at the tree level. We know that cflags are
+not propagated from one tree to another. Thus, if we see stind.x (regvar,
+iconst [0]), we know we can use the xor encoding.