summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-11-24 10:31:52 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-11-24 10:32:13 +0100
commitb5da3f3d64c857baf808220e202dc37c5c039eb8 (patch)
treef6ecb57556ab608bb926841bc1d6d79126883312
parentcbee74bdb4f85d6d8d4f192f0018ea023418e216 (diff)
downloadroux-b5da3f3d64c857baf808220e202dc37c5c039eb8.tar.gz
cosmetics in mem.c
-rw-r--r--mem.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mem.c b/mem.c
index e372f0f..2cc2719 100644
--- a/mem.c
+++ b/mem.c
@@ -228,7 +228,7 @@ coalesce(Fn *fn)
 	for (b=fn->start; b; b=b->link)
 		b->loop = -1;
 	loopiter(fn, maxrpo);
-	br = vnew(fn->nblk, sizeof br[0], PHeap);
+	br = emalloc(fn->nblk * sizeof br[0]);
 	ip = INT_MAX - 1;
 	for (n=fn->nblk-1; n>=0; n--) {
 		b = fn->rpo[n];
@@ -270,7 +270,7 @@ coalesce(Fn *fn)
 			}
 		br[n].a = ip;
 	}
-	vfree(br);
+	free(br);
 
 	/* kill slots with an empty live range */
 	total = 0;
@@ -290,11 +290,11 @@ coalesce(Fn *fn)
 	if (debug['M']) {
 		fputs("\n> Slot coalescing:\n", stderr);
 		if (n) {
-			fputs("\tDEAD", stderr);
+			fputs("\tkill [", stderr);
 			for (m=0; m<n; m++)
 				fprintf(stderr, " %%%s",
 					fn->tmp[kill[m]].name);
-			fputc('\n', stderr);
+			fputs(" ]\n", stderr);
 		}
 	}
 	while (n--) {
@@ -362,8 +362,7 @@ coalesce(Fn *fn)
 		for (s0=sl; s0<&sl[nsl]; s0++) {
 			if (s0->s != s0)
 				continue;
-			fprintf(stderr, "\tLOCL (% 3db) %s:",
-				s0->sz, fn->tmp[s0->t].name);
+			fprintf(stderr, "\tfuse (% 3db) [", s0->sz);
 			for (s=s0; s<&sl[nsl]; s++) {
 				if (s->s != s0)
 					continue;
@@ -374,9 +373,9 @@ coalesce(Fn *fn)
 				else
 					fputs("{}", stderr);
 			}
-			fputc('\n', stderr);
+			fputs(" ]\n", stderr);
 		}
-		fprintf(stderr, "\tSUMS %u/%u/%u (freed/fused/total)\n\n",
+		fprintf(stderr, "\tsums %u/%u/%u (killed/fused/total)\n\n",
 			freed, fused, total);
 		printfn(fn, stderr);
 	}