Changeset: 46776bb424da for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=46776bb424da
Modified Files:
        monetdb5/optimizer/opt_recycler.c
Branch: DVframework
Log Message:

recycler: catch mount instructions first.


diffs (44 lines):

diff --git a/monetdb5/optimizer/opt_recycler.c 
b/monetdb5/optimizer/opt_recycler.c
--- a/monetdb5/optimizer/opt_recycler.c
+++ b/monetdb5/optimizer/opt_recycler.c
@@ -109,6 +109,21 @@ OPTrecyclerImplementation(Client cntxt, 
                        }
                        continue;
                }
+               
+               if (getFunctionId(p) == mountRef) {
+                       recycled[getArg(p, 0)] = 1;
+                       p->recycle = RECYCLING;
+                       marks++;
+                       for (j = 0; j < p->retc; j++)
+                               recycled[getArg(p, j)] = 1;
+                       
+                       if(!preluded) {
+                               /* create a handle for recycler */
+                               (void) newFcnCall(mb, "recycle", "prelude");
+                               preluded = 1;
+                       }
+               }
+               
                // Not all instruction may be recycled. In particular, we 
should avoid
                // MAL function with implicit/recursive side effects. 
                // This can not always be detected easily. Likewise, we ignore 
cheap operations
@@ -126,18 +141,6 @@ OPTrecyclerImplementation(Client cntxt, 
                        pushInstruction(mb,p);
                        continue;
                }
-
-               if (getFunctionId(p) == mountRef) {
-                       recycled[getArg(p, 0)] = 1;
-                       p->recycle = RECYCLING;
-                       marks++;
-                       
-                       if(!preluded) {
-                               /* create a handle for recycler */
-                               (void) newFcnCall(mb, "recycle", "prelude");
-                               preluded = 1;
-                       }
-               }
                
                /* During base table recycling skip marking instructions other 
than octopus.bind */
                if (baseTableMode) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to