Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5781/compiler/mil
Modified Files:
Tag: M5XQ
mil_dce.c
Log Message:
propagated changes of Tuesday Sep 08 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/08 - sjoerd: compiler/mil/mil_dce.c,1.30
propagated changes of Monday Sep 07 2009 - Tuesday Sep 08 2009
from the Aug2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/07 - tsheyar: compiler/mil/mil_dce.c,1.29.2.1
-- Fix bug [2852928] in dead code elimination.
For a catch operator keep usage information even if the body
ignores some variable values.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U mil_dce.c
Index: mil_dce.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/mil_dce.c,v
retrieving revision 1.27.4.2
retrieving revision 1.27.4.3
diff -u -d -r1.27.4.2 -r1.27.4.3
--- mil_dce.c 20 Jun 2009 09:48:57 -0000 1.27.4.2
+++ mil_dce.c 8 Sep 2009 08:05:33 -0000 1.27.4.3
@@ -241,27 +241,34 @@
case m_catch:
{
- PFmil_t *new_child;
- PFmil_t *var = root->child[0];
- PFmil_t *body = root->child[1];
+ PFmil_t *new_child;
+ PFmil_t *var = root->child[0];
+ PFmil_t *body = root->child[1];
+ PFbitset_t *body_used_vars = PFbitset_copy (used_vars);
+ PFbitset_t *body_dirty_vars = PFbitset_copy (dirty_vars);
assert(var->kind == m_var);
+ /* try to find dead code in the body */
+ new_child = mil_dce_worker (body,
+ body_used_vars,
+ body_dirty_vars,
+ change);
+ if (change) root->child[1] = new_child;
+
+ /* all used variables stay used before the body */
+ PFbitset_or (used_vars, body_used_vars);
+
/* The variable is set to true. */
PFbitset_set (used_vars, var->sem.ident, true);
#ifndef NDEBUG
+ /* all used variables stay used before the body */
+ PFbitset_or (dirty_vars, body_dirty_vars);
+
/* variable on the left side is clean */
PFbitset_set (dirty_vars, var->sem.ident, false);
#endif
-
- /* try to find dead code in the body */
- new_child = mil_dce_worker (body,
- used_vars,
- dirty_vars,
- change);
- if (change) root->child[1] = new_child;
-
return root;
}
break;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins