summary refs log tree commit diff
path: root/lisc/parse.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-10 13:55:47 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:27 -0400
commit851e79f9590b705a0fb168d16755caad03650348 (patch)
treee74b6dd89f53b4bd81661387cc6cbdea23836b63 /lisc/parse.c
parent11db0b61d95d63830e1e87f20464b10c5d316d0f (diff)
downloadroux-851e79f9590b705a0fb168d16755caad03650348.tar.gz
add rpo information to functions
Diffstat (limited to 'lisc/parse.c')
-rw-r--r--lisc/parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisc/parse.c b/lisc/parse.c
index ad57d7e..e17c264 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -54,6 +54,7 @@ static struct {
 } bmap[NBlks+1];
 static Blk *curb;
 static Blk **blink;
+static int nblk;
 
 static struct {
 	long long num;
@@ -203,6 +204,7 @@ blocka()
 	*b = zblock;
 	*blink = b;
 	blink = &b->link;
+	nblk++;
 	return b;
 }
 
@@ -443,6 +445,7 @@ parsefn(FILE *f)
 	curi = ins;
 	curb = 0;
 	lnum = 1;
+	nblk = 0;
 	fn = alloc(sizeof *fn);
 	blink = &fn->start;
 	ps = PLbl;
@@ -452,6 +455,8 @@ parsefn(FILE *f)
 	fn->sym = alloc(ntemp * sizeof sym[0]);
 	memcpy(fn->sym, sym, ntemp * sizeof sym[0]);
 	fn->ntemp = ntemp;
+	fn->nblk = nblk;
+	fn->rpo = 0;
 	return fn;
 }