Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32634/mil

Modified Files:
      Tag: May2009
        mil_dce.c 
Log Message:
-- Fix bug in the MIL dead code elimination.


U mil_dce.c
Index: mil_dce.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/mil_dce.c,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- mil_dce.c   7 May 2009 14:27:47 -0000       1.28
+++ mil_dce.c   19 Jun 2009 13:20:18 -0000      1.28.2.1
@@ -505,16 +505,19 @@
         case m_assgn:
             assert(n->child[0]->kind == m_var);
 
+            mark_used = PFbitset_get (used_vars, n->child[0]->sem.ident);
+
+            /* The variable is unused before the assignment (but may be
+               used in the right part again -- e.g., 'a := a.reverse();' */
+            PFbitset_set (used_vars, n->child[0]->sem.ident, false);
+
             /* Propagate the information whether the input has to
                be materialized or not. */
             mil_materialize_elimination (n->child[1],
                                          used_vars,
-                                         PFbitset_get (used_vars,
-                                                       n->child[0]->sem.ident),
+                                         mark_used,
                                          change);
 
-            /* The variable is unused before the assignment. */
-            PFbitset_set (used_vars, n->child[0]->sem.ident, false);
             break;
 
         case m_var:


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to