summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-11-20 21:39:36 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-11-20 21:44:25 +0100
commit0d50ebaed94f595961d88544a028bf7f523d3eac (patch)
treec11c340d53c25b44342e6a3ebc58cfa8fb5ec065
parent8ecae922997c55f70cd9e19cbf947a520f7ecca3 (diff)
downloadroux-0d50ebaed94f595961d88544a028bf7f523d3eac.tar.gz
fill definition site in filluse()
-rw-r--r--all.h1
-rw-r--r--ssa.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/all.h b/all.h
index 45ebdff..881bdd5 100644
--- a/all.h
+++ b/all.h
@@ -289,6 +289,7 @@ struct Alias {
struct Tmp {
char name[NString];
+ Ins *ins;
Use *use;
uint ndef, nuse;
uint bid; /* id of a defining block */
diff --git a/ssa.c b/ssa.c
index f3e9b45..d2ac227 100644
--- a/ssa.c
+++ b/ssa.c
@@ -47,6 +47,7 @@ filluse(Fn *fn)
/* todo, is this the correct file? */
tmp = fn->tmp;
for (t=Tmp0; t<fn->ntmp; t++) {
+ tmp[t].ins = 0;
tmp[t].bid = -1u;
tmp[t].ndef = 0;
tmp[t].nuse = 0;
@@ -88,6 +89,7 @@ filluse(Fn *fn)
w = WFull;
t = i->to.val;
tmp[t].width = w;
+ tmp[t].ins = i;
tmp[t].bid = b->id;
tmp[t].ndef++;
tmp[t].cls = i->cls;