summary refs log tree commit diff
path: root/lisc/parse.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-16 03:25:12 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:28 -0400
commit77bdb3ae9e925c9063f10ff9e1e5cf8ac66538ce (patch)
treedb0fc1f1b9d0e5a093829f4a8d46a100c3cabffb /lisc/parse.c
parent7295adcadeae8dadeb09bd412fd15c48779b82cc (diff)
downloadroux-77bdb3ae9e925c9063f10ff9e1e5cf8ac66538ce.tar.gz
move main function out of parse.c
Diffstat (limited to 'lisc/parse.c')
-rw-r--r--lisc/parse.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/lisc/parse.c b/lisc/parse.c
index 47f9ec8..7a9da59 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -532,81 +532,3 @@ printfn(Fn *fn, FILE *f)
 		}
 	}
 }
-
-
-static void
-dumprset(Bits *b, Fn *fn)
-{
-	int t;
-
-	for (t=Tmp0; t<fn->ntmp; t++)
-		if (BGET(*b, t))
-			printf(" %s", fn->sym[t].name);
-}
-
-int
-main(int ac, char *av[])
-{
-	int opt, pr;
-	Fn *fn;
-
-	fn = parsefn(stdin);
-
-	pr = 1;
-	opt = 0;
-	if (ac > 1 && av[1][0] == '-')
-		opt = av[1][1];
-
-	switch (opt) {
-	case 'f': {
-		int tx, ntmp;
-
-		fprintf(stderr, "[Testing SSA Reconstruction:");
-		fillpreds(fn);
-		for (ntmp=fn->ntmp, tx=Tmp0; tx<ntmp; tx++) {
-			fprintf(stderr, " %s", fn->sym[tx].name);
-			ssafix(fn, tx);
-		}
-		fprintf(stderr, "]\n");
-		break;
-	}
-	case 'r': {
-		int n;
-
-		fprintf(stderr, "[Testing RPO]\n");
-		fillrpo(fn);
-		assert(fn->rpo[0] == fn->start);
-		for (n=0;; n++)
-			if (n == fn->nblk-1) {
-				fn->rpo[n]->link = 0;
-				break;
-			} else
-				fn->rpo[n]->link = fn->rpo[n+1];
-		break;
-	}
-	case 'l': {
-		Blk *b;
-
-		fprintf(stderr, "[Testing Liveness]\n");
-		fillrpo(fn);
-		filllive(fn);
-		for (b=fn->start; b; b=b->link) {
-			printf("> Block %s\n", b->name);
-			printf("\t in: [");
-			dumprset(&b->in, fn);
-			printf(" ]\n");
-			printf("\tout: [");
-			dumprset(&b->out, fn);
-			printf(" ]\n");
-		}
-		pr = 0;
-		break;
-	}
-	default:
-		break;
-	}
-
-	if (pr)
-		printfn(fn, stdout);
-	return 0;
-}