aboutsummaryrefslogtreecommitdiffhomepage
path: root/ssa.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-21 12:32:32 +0200
committerlemon <lsof@mailbox.org>2023-06-21 12:32:32 +0200
commit995fd23ecd5de710a6f587d29af2874b1fb4756d (patch)
treec8c8d95d51a25abbfc3ea08f984b8a1720cacc4b /ssa.c
parent2e4d5123544b86ec13e166dc94da43c850a588f2 (diff)
explicitly store predecessors in each block
Diffstat (limited to 'ssa.c')
-rw-r--r--ssa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssa.c b/ssa.c
index 0db9aaf..46e0741 100644
--- a/ssa.c
+++ b/ssa.c
@@ -30,9 +30,9 @@ ssauses(struct function *fn)
do {
for (int i = 0; i < blk->phi.n; ++i) {
int ins = blk->phi.p[i];
- struct phi *phi = &phitab.p[instrtab[ins].l.i];
- for (int i = 0; i < phi->n; ++i) {
- USE(phi->ref[i], 0, ins);
+ union ref *phi = phitab.p[instrtab[ins].l.i];
+ for (int i = 0; i < blk->npred; ++i) {
+ USE(phi[i], 0, ins);
}
}
for (int i = 0; i < blk->ins.n; ++i) {