[Mono-bugs] [Bug 61894][Wis] New - [PATCH] add a simplistic deadce engine to copyprop
Fri, 23 Jul 2004 19:51:33 -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 email@example.com.
--- shadow/61894 2004-07-23 19:51:33.000000000 -0400
+++ shadow/61894.tmp.32299 2004-07-23 19:51:33.000000000 -0400
@@ -0,0 +1,35 @@
+Product: Mono: Runtime
+Summary: [PATCH] add a simplistic deadce engine to copyprop
+Copy propagation is extremely likely to create dead variables. Right now,
+these variables stay around in the source code unless the -O=deadce
+optimization is enabled. However, this optimization requires the building
+of the SSA form, which is expensive -- especially in JIT mode.
+This patch implements an extremely simple version of deadce. Basically, any
+variable without reads will be eliminated.
+This extra pass through the IR does not cause an increase in compile time.
+In fact, it has the benefit of reducing the work that must be done by the
+SSA pass -- running -O=deadce,copyprop now is faster than it was before
+(nb: it is still slower [in jit time] than -O=deadce, this is because SCCP
+is enabled with -O=copyprop -- this should be fixed)
+In the patch, I had to remove the duplicated calls to cfolding. What
+happened was that some trees got their operands swapped -- so one of the
+arms was never visited. This resulted in some errors.