Changeset: 67cf2318c73b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=67cf2318c73b
Modified Files:
        MonetDB5/src/optimizer/opt_tarantula.mx
Branch: default
Log Message:

Only break on last mat.pack
This increases the granularity of the legs.


diffs (35 lines):

diff -r 9460a561d74e -r 67cf2318c73b MonetDB5/src/optimizer/opt_tarantula.mx
--- a/MonetDB5/src/optimizer/opt_tarantula.mx   Wed Nov 17 09:22:25 2010 +0100
+++ b/MonetDB5/src/optimizer/opt_tarantula.mx   Wed Nov 17 09:29:42 2010 +0100
@@ -933,7 +933,7 @@
 OPTtarantulaImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci)
 {
        InstrPtr q, p, pp, *old;
-       int last=0, i, j, k, l, limit, actions=0, block = 0, fnd;
+       int last=0, i, j, k, l, limit, actions=0, block = 0, fnd, target;
        int leg=0, ta =0, vtop=0;
        MalBlkPtr tm;
        char fcn[BUFSIZ];
@@ -1012,6 +1012,13 @@
        for ( i = 0; i < VTOP * vtop; i++)
                map[i] = i;
 
+       /* find the last mat.pack instruction */
+       target=0;
+       for (i = limit-1; i > 0; i--) 
+       if( getModuleId(old[i])== matRef && getFunctionId(old[i])== packRef) {
+               target = i;
+               break;
+       }
        for (i = 1; i < limit; i++) {
                p = old[i];
                if ( p == 0)
@@ -1021,7 +1028,7 @@
                        old[i]= 0;
                        continue;
                }
-               if( getModuleId(p)== matRef && getFunctionId(p)== packRef) {
+               if( i == target) {
 @-
 The critical part is to determine the input/output variable set
 for this pack function. Some variables may have to be re-used
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to