ref: bcaade73359400424fb9ff18697e81444b365245
parent: 983f8702b46c7791c488ed8d635b0ce595ef0e5e
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Aug 20 19:52:38 EDT 2016
Print the function name when debug dumping RA
--- a/6/asm.h
+++ b/6/asm.h
@@ -163,6 +163,8 @@
/* instruction selection state */
struct Isel {
+ char *name;
+
Cfg *cfg; /* cfg built with nodes */
Asmbb **bb; /* 1:1 mappings with the Node bbs in the CFG */
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -349,6 +349,7 @@
Isel is = {0,};
is.reglocs = mkht(varhash, vareq);
+ is.name = fn->name;
is.stkoff = fn->stkoff;
is.envoff = fn->envoff;
is.globls = globls;
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -368,6 +368,7 @@
Isel is = {0,};
is.reglocs = mkht(varhash, vareq);
+ is.name = fn->name;
is.stkoff = fn->stkoff;
is.envoff = fn->envoff;
is.globls = globls;
--- a/6/ra.c
+++ b/6/ra.c
@@ -1431,6 +1431,7 @@
char *sep;
Asmbb *bb;
+ fprintf(fd, "function %s\n", s->name);
fprintf(fd, "WORKLISTS -- \n");
wlprint(stdout, "spill", s->wlspill, s->nwlspill);
wlprint(stdout, "simp", s->wlsimp, s->nwlsimp);