summary refs log tree commit diff
path: root/fold.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-19 11:07:07 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-19 11:07:54 -0400
commit43967b6306aa18903b3ba2b00e701facaf306840 (patch)
tree146330b3da69d9a27f83fe1db93dd09f2c0a6764 /fold.c
parent20c9ec62ffde331fad41c5f05cc05a20b7aa08fa (diff)
downloadroux-43967b6306aa18903b3ba2b00e701facaf306840.tar.gz
use assert for ssa invariants in fold/copy
Diffstat (limited to 'fold.c')
-rw-r--r--fold.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fold.c b/fold.c
index 2c72999..3adb56b 100644
--- a/fold.c
+++ b/fold.c
@@ -126,7 +126,7 @@ visitjmp(Blk *b, int n, Fn *fn)
 	switch (b->jmp.type) {
 	case JJnz:
 		l = latval(b->jmp.arg);
-		assert(l != Top);
+		assert(l != Top && "ssa invariant broken");
 		if (l == Bot) {
 			edge[n][1].work = flowrk;
 			edge[n][0].work = &edge[n][1];
@@ -172,7 +172,7 @@ renref(Ref *r)
 
 	if (rtype(*r) == RTmp)
 		if ((l=val[r->val]) != Bot) {
-			assert(l != Top);
+			assert(l != Top && "ssa invariant broken");
 			*r = CON(l);
 			return 1;
 		}