Changeset: 833a1a2f5989 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=833a1a2f5989
Modified Files:
monetdb5/optimizer/opt_commonTerms.c
Branch: default
Log Message:
Avoid re-using instructions that might have been produced in a different
barrier block.
diffs (18 lines):
diff --git a/monetdb5/optimizer/opt_commonTerms.c
b/monetdb5/optimizer/opt_commonTerms.c
--- a/monetdb5/optimizer/opt_commonTerms.c
+++ b/monetdb5/optimizer/opt_commonTerms.c
@@ -89,6 +89,14 @@ OPTcommonTermsImplementation(Client cntx
pushInstruction(mb,p);
continue;
}
+
+ /* when we enter a barrier block, we should ditch all previous
instructions from consideration */
+ if( p->barrier== BARRIERsymbol || p->barrier== CATCHsymbol ||
p->barrier == RETURNsymbol){
+ GDKfree(list);
+ GDKfree(list);
+ list = (int*) GDKzalloc(sizeof(int) * mb->stop);
+ hash = (int*) GDKzalloc(sizeof(int) * mb->vtop);
+ }
/* side-effect producing operators can never be replaced */
/* the same holds for function calls without an argument, it is
unclear where the results comes from (e.g. clock()) */
if ( mayhaveSideEffects(cntxt, mb, p,TRUE) || p->argc ==
p->retc){
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list