From: bal Date: Thu, 19 Sep 1985 11:14:55 +0000 (+0000) Subject: bug fixed: same problem as in r1.3, now with csb. X-Git-Tag: release-5-5~5412 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8668e313f8b2891a2d6cc4c64f4282b7f0109fe4;p=ack.git bug fixed: same problem as in r1.3, now with csb. Solution: only do block fusion if first block end on bra. --- diff --git a/util/ego/bo/bo.c b/util/ego/bo/bo.c index bcefd098d..02cb8640c 100644 --- a/util/ego/bo/bo.c +++ b/util/ego/bo/bo.c @@ -190,13 +190,10 @@ STATIC mv_code(b1,b2) line_p l,x; l = last_code(b2->b_start,TRUE); + assert(INSTR(l) == op_bra); DLINK(l,b1->b_start); x = l->l_next; - if (TYPE(l) == OPINSTRLAB) { - assert(INSTR(x) == op_lab); - assert(INSTRLAB(l) == INSTRLAB(x)); - rm_line(l,b2); - } + rm_line(l,b2); if (INSTR(x) == op_lab) { rm_line(x,b2); } @@ -207,13 +204,15 @@ bo_switch(b) { bblock_p s,x; Lindex i; - line_p l; + line_p l,bra; if (Lnrelems(b->b_succ) == 1) { s = (bblock_p) Lelem(Lfirst(b->b_succ)); if (b->b_start != (line_p) 0 && s->b_start != (line_p) 0 && Lnrelems(s->b_pred) == 1 && + (bra = last_code(b->b_start,TRUE)) != (line_p) 0 && + INSTR(bra) == op_bra && (s->b_next == (bblock_p) 0 || !Lis_elem(s->b_next,s->b_succ))) { l = last_code(s->b_start,FALSE);