summary refs log tree commit diff
path: root/ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssa.c')
-rw-r--r--ssa.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ssa.c b/ssa.c
index 77c6258..7e03578 100644
--- a/ssa.c
+++ b/ssa.c
@@ -87,16 +87,11 @@ filluse(Fn *fn)
 static void
 addpred(Blk *bp, Blk *bc)
 {
-	uint i;
-
 	if (!bc->pred) {
 		bc->pred = alloc(bc->npred * sizeof bc->pred[0]);
-		for (i=0; i<bc->npred; i++)
-			bc->pred[i] = 0;
+		bc->visit = 0;
 	}
-	for (i=0; bc->pred[i]; i++)
-		;
-	bc->pred[i] = bp;
+	bc->pred[bc->visit++] = bp;
 }
 
 /* fill predecessors information in blocks