Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5215

Modified Files:
        opt_commonTerms.mx opt_support.mx 
Log Message:
Widen the applicability of common terms


Index: opt_commonTerms.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_commonTerms.mx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- opt_commonTerms.mx  2 Feb 2008 09:08:03 -0000       1.28
+++ opt_commonTerms.mx  7 Feb 2008 08:15:26 -0000       1.29
@@ -141,14 +141,12 @@
                        getArgType(mb,p,0)== getArgType(mb,p,1) &&
                        getLastUpdate(span,getArg(p,0)) == i &&
                        getBeginLifespan(span,getArg(p,0)) == i &&
-                       getLastUpdate(span,getArg(p,1) < i) ){
+                       getLastUpdate(span,getArg(p,1)) <= i ){
                                        alias[getArg(p,0)] = alias[getArg(p,1)];
-/* can be handled by the deadcode optimizer
                                        freeInstruction(p);
                                        mb->stop--;
                                        mb->stmt[mb->stop]=0;
                                        n--;
-*/
                                        continue;
                        } 
                for(j=0; j<p->argc; j++)
@@ -187,8 +185,7 @@
                                printf("%d, %d  %d %d ", i, j, 
                                        hasSameSignature(p, q), 
                                        hasSameArguments(mb, p, q));
-                               printf(" :%d %d %d %d %d %d\n", 
-                                       !isUpdated(mb, i), 
+                               printf(" :%d %d %d %d %d\n", 
                                        !hasCommonResults(p, q), 
                                        !hasSideEffects(p, TRUE),
                                        !hasSideEffects(q, TRUE),
@@ -200,14 +197,7 @@
 Simple assignments are not replaced either. They should be
 handled by the alias removal part
 @c
-                               if (q->token != ASSIGNsymbol && q->retc == 1 &&
-                                       ( getModuleId(p)== batcalcRef  ||
-                                         getModuleId(p)== batstrRef ||
-                                         getModuleId(p)== batmathRef ||
-                                         getModuleId(p)== mmathRef ||
-                                         getModuleId(p)== algebraRef ||
-                                         getModuleId(p)== strRef ||
-                                         getModuleId(p)== calcRef) &&
+                               if (q->token != ASSIGNsymbol && 
                                        hasSameSignature(p, q) && 
                                        hasSameArguments(mb, p, q) && 
                                        getLastUpdate(span, getArg(p,0)) <= i &&
@@ -235,12 +225,10 @@
                                                
getBeginLifespan(span,getArg(p,0)) == i &&
                                                getLastUpdate(span,getArg(p,1)) 
< i){
                                                        alias[getArg(p,0)]= 
alias[getArg(p,1)];
-/*
                                                        freeInstruction(p);
                                                        mb->stop--;
                                                        mb->stmt[mb->stop]=0;
                                                        n--;
-*/
                                        }
                                        j= 0; /* end of search */
                                }

Index: opt_support.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_support.mx,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- opt_support.mx      2 Feb 2008 09:08:03 -0000       1.58
+++ opt_support.mx      7 Feb 2008 08:15:27 -0000       1.59
@@ -766,6 +766,7 @@
 Take into account that variables may be declared inside
 a block. This can be calculated using the BARRIER/CATCH
 and EXIT pairs.
[EMAIL PROTECTED]
 @c
 static int
 countBlocks(MalBlkPtr mb, int start, int stop){
@@ -810,6 +811,7 @@
        }
        return TRUE;
 }
[EMAIL PROTECTED]
 @-
 The safety property should be relatively easy to determine for
 each MAL function. This calls for accessing the function MAL block
@@ -1038,7 +1040,6 @@
 * Dead Code Removal::
 * Empty Set Removal::
 * Garbage Collector::
-* Generators::
 * Heuristic Rules::
 * Inline Functions::
 * Join Paths::


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

Reply via email to