[Mono-bugs] [Bug 73936][Min] Changed - gmcs does not optimize for space

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 21 Mar 2005 13:51:41 -0500 (EST)

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 dsilva@ccs.neu.edu.


--- shadow/73936	2005-03-21 13:25:55.000000000 -0500
+++ shadow/73936.tmp.23786	2005-03-21 13:51:41.000000000 -0500
@@ -84,6 +84,23 @@
 ------- Additional Comments From bmaurer@users.sf.net  2005-03-21 13:25 -------
 csc does not do this. In general the solution is to not make recursive
 The jit may be able to optimize this, but IIRC, the msft jit doesn't;
 so it wouldn't be cross platform.
+------- Additional Comments From dsilva@ccs.neu.edu  2005-03-21 13:51 -------
+I don't quite understand the comment about cross-platform
+compatibility.  The optimization preserves program semantics.  I can't
+imagine any program depending on stack overflows and memory explosion.
+I'm not very familiar with the Mono policies -- must every mcs/gmcs
+optimization produce IL identical to csc's output?  I thought some
+recent optimization work was aimed at producing better code that might
+differ from csc's output, eg:
+A note about not making recursive calls: I made a mistake in my
+report; the tail instruction is for non-recursive tail calls.  It's
+standard practice to compile tail recursive calls into unconditional
+branches to the top instead.