summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ssa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssa.c b/ssa.c
index 04ccc24..298f0ae 100644
--- a/ssa.c
+++ b/ssa.c
@@ -8,6 +8,8 @@ adduse(Tmp *tmp, int ty, Blk *b, ...)
 	int n;
 	va_list ap;
 
+	if (!tmp->use)
+		return;
 	va_start(ap, b);
 	n = tmp->nuse;
 	vgrow(&tmp->use, ++tmp->nuse);
@@ -44,7 +46,7 @@ filluse(Fn *fn)
 
 	/* todo, is this the correct file? */
 	tmp = fn->tmp;
-	for (t=0; t<fn->ntmp; t++) {
+	for (t=Tmp0; t<fn->ntmp; t++) {
 		tmp[t].ndef = 0;
 		tmp[t].nuse = 0;
 		tmp[t].phi = 0;