Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6562

Modified Files:
      Tag: XQuery_0-18
        mil_opt.c 
Log Message:
Only delete assignments if we can *positively* determine that the
variable was unused.  We can only determine this if there was no
overflow in the variable list.  Note that we can't determine actual
overflow, the best we can do is check whether the table is full.


Index: mil_opt.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/mil_opt.c,v
retrieving revision 1.28.2.2
retrieving revision 1.28.2.3
diff -u -d -r1.28.2.2 -r1.28.2.3
--- mil_opt.c   6 Jun 2007 16:18:07 -0000       1.28.2.2
+++ mil_opt.c   20 Jul 2007 12:12:30 -0000      1.28.2.3
@@ -536,7 +536,7 @@
  */
 static void opt_assign(opt_t *o, opt_name_t *name, unsigned int stmt) {
        int i = opt_findvar(o, name);
-       /* we may only prune if the variable being overwritten comes from a 
unconditional scope */
+       /* we may only prune if the variable being overwritten comes from an 
unconditional scope */
        if (i >= 0) {
                unsigned int def_stmt = o->vars[i].def_stmt;
                unsigned int cond = OPT_COND(o);
@@ -576,8 +576,12 @@
                        opt_move_add(o, stmt); /* register this statement as 
moveable */
 #endif
                }
-       } else {
-               /* delete this statement */
+       } else if (o->curvar+1 < OPT_VARS) {
+               /* delete this statement (but only if there was no
+                  variable overflow, but note that we can't actually
+                  see whether there was overflow, we can only see
+                  whether the table is full, so we assume that there
+                  was overflow when the table is full) */
                o->stmts[stmt].deleted = o->delete;
        }
 }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to