summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-20 23:52:38 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-20 23:52:38 -0700
commitbcaade73359400424fb9ff18697e81444b365245 (patch)
tree7319cbade65e30cee4ad051962b878e6e32fd235 /6
parent983f8702b46c7791c488ed8d635b0ce595ef0e5e (diff)
downloadmc-bcaade73359400424fb9ff18697e81444b365245.tar.gz
Print the function name when debug dumping RA
Diffstat (limited to '6')
-rw-r--r--6/asm.h2
-rw-r--r--6/gengas.c1
-rw-r--r--6/genp9.c1
-rw-r--r--6/ra.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/6/asm.h b/6/asm.h
index 25c2aca..5d5349b 100644
--- a/6/asm.h
+++ b/6/asm.h
@@ -163,6 +163,8 @@ struct Asmbb {
/* 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 */
diff --git a/6/gengas.c b/6/gengas.c
index a591d3c..968fbe1 100644
--- a/6/gengas.c
+++ b/6/gengas.c
@@ -349,6 +349,7 @@ static void genfunc(FILE *fd, Func *fn, Htab *globls, Htab *strtab)
Isel is = {0,};
is.reglocs = mkht(varhash, vareq);
+ is.name = fn->name;
is.stkoff = fn->stkoff;
is.envoff = fn->envoff;
is.globls = globls;
diff --git a/6/genp9.c b/6/genp9.c
index 2f5bb55..efe96e0 100644
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -368,6 +368,7 @@ static void genfunc(FILE *fd, Func *fn, Htab *globls, Htab *strtab)
Isel is = {0,};
is.reglocs = mkht(varhash, vareq);
+ is.name = fn->name;
is.stkoff = fn->stkoff;
is.envoff = fn->envoff;
is.globls = globls;
diff --git a/6/ra.c b/6/ra.c
index 085f04c..6b417de 100644
--- a/6/ra.c
+++ b/6/ra.c
@@ -1431,6 +1431,7 @@ void dumpasm(Isel *s, FILE *fd)
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);