Changeset: b99a93db78c0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b99a93db78c0
Modified Files:
        monetdb5/mal/mal_function.c
Branch: default
Log Message:

Expand dot capabilities.
The flow graph now also covers re-assignments of variables.
Still to be done are the barrier blocks.

HG :Enter commit message.  Lines beginning with 'HG:' are removed.


diffs (53 lines):

diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -943,11 +943,9 @@ void chkDeclarations(MalBlkPtr mb){
        GDKfree(decl);
 }
 /*
- * @-
  * Data flow analysis.
  * Flow graph display is handy for debugging and analysis.
- * A better flow analysis is needed, which takes into account
- * loops and side-effect functions.
+ * A better flow analysis is needed, which takes into account barrier blocks 
  */
 static void
 showOutFlow(MalBlkPtr mb, int pc, int varid, stream *f)
@@ -955,11 +953,12 @@ showOutFlow(MalBlkPtr mb, int pc, int va
        InstrPtr p;
        int i, k,found;
 
+
        for (i = pc + 1; i < mb->stop - 1; i++) {
                p = getInstrPtr(mb, i);
                found=0;
-               for (k = p->retc; k < p->argc; k++) {
-                       if (p->argv[k] == varid ) {
+               for (k = 0; k < p->argc; k++) {
+                       if (p->argv[k] == varid  ){
                                mnstr_printf(f, "n%d -> n%d\n", pc, i);
                                found++;
                        }
@@ -980,19 +979,18 @@ showInFlow(MalBlkPtr mb, int pc, int var
 {
        InstrPtr p;
        int i, k;
+
        /* find last use, needed for operations with side effects */
        for (i = pc -1; i >= 0; i-- ){
                p = getInstrPtr(mb, i);
                for (k = 0; k < p->argc; k++)
-                       if (p->argv[k] == varid  ){
+                       if (p->argv[k] == varid )
                                mnstr_printf(f, "n%d -> n%d\n",i, pc);
                                return;
                        }
-       }
 }
 
 /*
- * @-
  * We only display the minimal debugging information. The remainder
  * can be obtained through the profiler.
  */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to