summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
Diffstat (limited to 'lisc')
-rw-r--r--lisc/main.c2
-rw-r--r--lisc/ssa.c16
2 files changed, 8 insertions, 10 deletions
diff --git a/lisc/main.c b/lisc/main.c
index 10de4d6..6e27e3e 100644
--- a/lisc/main.c
+++ b/lisc/main.c
@@ -55,8 +55,10 @@ func(Fn *fn)
 	filluse(fn);
 #if 0
 	memopt(fn);
+#endif
 	ssa(fn);
 	filluse(fn);
+#if 0
 	copy(fn);
 	filluse(fn);
 #endif
diff --git a/lisc/ssa.c b/lisc/ssa.c
index 7353dc3..9b584a7 100644
--- a/lisc/ssa.c
+++ b/lisc/ssa.c
@@ -171,8 +171,6 @@ fillrpo(Fn *f)
 	}
 }
 
-#if 0
-
 /* for dominators computation, read
  * "A Simple, Fast Dominance Algorithm"
  * by K. Cooper, T. Harvey, and K. Kennedy.
@@ -295,7 +293,7 @@ phiins(Fn *fn)
 	Ins *i;
 	Phi *p;
 	Ref r;
-	int t, n, w, nt;
+	int t, n, k, nt;
 
 	blist = emalloc(fn->nblk * sizeof blist[0]);
 	be = &blist[fn->nblk];
@@ -305,7 +303,7 @@ phiins(Fn *fn)
 		if (fn->tmp[t].phi != 0)
 			continue;
 		BZERO(u);
-		w = -1;
+		k = -1;
 		bp = be;
 		for (b=fn->start; b; b=b->link) {
 			b->visit = 0;
@@ -329,9 +327,9 @@ phiins(Fn *fn)
 							BSET(u, b->id);
 							*--bp = b;
 						}
-						if (w == -1)
-							w = i->wide;
-						if (w != i->wide)
+						if (k == -1)
+							k = i->cls;
+						if (k != i->cls)
 							/* uh, oh, warn */
 							;
 					}
@@ -350,7 +348,7 @@ phiins(Fn *fn)
 				if (a->visit++ == 0)
 				if (BGET(a->in, t)) {
 					p = alloc(sizeof *p);
-					p->wide = w;
+					p->cls = k;
 					p->to = TMP(t);
 					p->link = a->phi;
 					a->phi = p;
@@ -514,5 +512,3 @@ ssa(Fn *fn)
 		printfn(fn, stderr);
 	}
 }
-
-#endif