qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 0d50ebaed94f595961d88544a028bf7f523d3eac
parent 8ecae922997c55f70cd9e19cbf947a520f7ecca3
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Sun, 20 Nov 2022 21:39:36 +0100

fill definition site in filluse()

Diffstat:
Mall.h | 1+
Mssa.c | 2++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git 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 @@ -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;