Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2822
Modified Files:
Tag: MonetDB_5-4
opt_commonTerms.mx
Log Message:
Bracket at the wrong place.
Index: opt_commonTerms.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_commonTerms.mx,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- opt_commonTerms.mx 2 Feb 2008 09:08:03 -0000 1.28
+++ opt_commonTerms.mx 6 Feb 2008 07:12:52 -0000 1.28.2.1
@@ -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 */
}
-------------------------------------------------------------------------
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