From a335d78758e7890b1febb9cc4405a2cda0187948 Mon Sep 17 00:00:00 2001 From: Boyana Norris Date: Tue, 14 Jul 2015 11:09:20 -0700 Subject: [PATCH] Example fix for #11, the outer loop should NOT be outside the annotationbecause Orio needs to see its index variable in the body. Similar fixes should be implemented for other examples that give this error. --- orio/module/loop/cfg.py | 1 + testsuite/SPAPT/lu/lu.src1.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/orio/module/loop/cfg.py b/orio/module/loop/cfg.py index 7add60fe..ebee90e7 100644 --- a/orio/module/loop/cfg.py +++ b/orio/module/loop/cfg.py @@ -112,6 +112,7 @@ def visit(self, nodes, params={}): try: for node in nodes: if not node: continue + v = CFGVertex(node.id, node) if isinstance(node, ast.ForStmt): self.display(node) # Children: header: node.init, node.test, node.iter; body: node.stmt diff --git a/testsuite/SPAPT/lu/lu.src1.c b/testsuite/SPAPT/lu/lu.src1.c index bf038ae5..b9c81647 100644 --- a/testsuite/SPAPT/lu/lu.src1.c +++ b/testsuite/SPAPT/lu/lu.src1.c @@ -34,6 +34,7 @@ + param U1_K[] = [1]; param U1_J[] = range(1,31); param VEC1[] = [False,True]; @@ -77,12 +78,12 @@ int iii, jjj, kkk; /*@ begin Loop ( -for (k=0; k<=N-1; k++) { transform Composite( - unrolljam = (['j'],[U1_J]), + unrolljam = (['k','j'],[U1_K,U1_J]), scalarreplace = (SCR, 'double'), vector = (VEC1, ['ivdep','vector always']) ) + for (k=0; k<=N-1; k++) { for (j=k+1; j<=N-1; j++) A[k][j] = A[k][j]/A[k][k];