diff options
Diffstat (limited to 'optmem.c')
| -rw-r--r-- | optmem.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -19,7 +19,7 @@ static const uchar load2ext[] = { #define load2ext(o) (load2ext[(o) - Oloads1]) #define storesz(o) (1 << ((o) - Ostore1)) -/* Implements algorithm in 'Simple and Efficient Construction of Static Single' (Braun et al) */ +/* Implements algorithm in 'Simple and Efficient Construction of Static Single Assignment' (Braun et al) */ struct pendingphi { ushort var, phi; }; struct ssabuilder { @@ -43,6 +43,9 @@ deltrivialphis(struct ssabuilder *sb, struct block *blk, union ref phiref) assert(instrtab[phiref.i].op == Ophi); + if (phiref.i == 4) + efmt(""); + for (int i = 0; i < blk->npred; ++i) { if (args[i].bits == same.bits || args[i].bits == phiref.bits) continue; /* unique value or self-reference */ @@ -79,6 +82,7 @@ Redo: } } } + deluses(phiref.i); return same; } @@ -185,7 +189,6 @@ mem2reg(struct function *fn) } do { - for (int i = 0; i < blk->ins.n; ++i) { struct use *use, *uend; enum irclass k = 0; |