diff options
Diffstat (limited to 'ssa.c')
-rw-r--r-- | ssa.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -339,6 +339,8 @@ void ssa_generate(int quiet) { cf->defs = defs; cf->entry = entry; cf->next = func_ir; + memmove(cf->blks, blks); + memmove(cf->ord, ord); func_ir = cf; gbbase += bcnt; bcnt = 0; @@ -2145,7 +2147,7 @@ void const_propagation(void) { int i; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ni, ih = b->insts; for (i = ih->next; i != ih; i = ni) { @@ -2282,7 +2284,7 @@ void strength_reduction(void) { int call_cnt = 0; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ni, ih = b->insts; for (i = ih->next; i != ih; i = ni) { @@ -2615,7 +2617,7 @@ void deadcode_elimination() { int i; for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ih = b->insts; for (i = ih->next; i != ih; i = i->next) { @@ -2626,7 +2628,7 @@ void deadcode_elimination() { } for (i = bcnt - 1; i >= 0; i--) { - CBlock_t b = blks[vis[i]]; + CBlock_t b = blks[ord[i]]; CInst_t i, ih = b->insts; for (i = ih->next; i != ih; i = i->next) if (i->op != CALL && i->dest && i->dest->kind == TMP && !i->dest->dep) |