bug fixed: same problem as in r1.3, now with csb.
Solution: only do block fusion if first block end on bra.
This commit is contained in:
parent
a18c5dd9c4
commit
8668e313f8
1 changed files with 5 additions and 6 deletions
|
@ -190,13 +190,10 @@ STATIC mv_code(b1,b2)
|
||||||
line_p l,x;
|
line_p l,x;
|
||||||
|
|
||||||
l = last_code(b2->b_start,TRUE);
|
l = last_code(b2->b_start,TRUE);
|
||||||
|
assert(INSTR(l) == op_bra);
|
||||||
DLINK(l,b1->b_start);
|
DLINK(l,b1->b_start);
|
||||||
x = l->l_next;
|
x = l->l_next;
|
||||||
if (TYPE(l) == OPINSTRLAB) {
|
rm_line(l,b2);
|
||||||
assert(INSTR(x) == op_lab);
|
|
||||||
assert(INSTRLAB(l) == INSTRLAB(x));
|
|
||||||
rm_line(l,b2);
|
|
||||||
}
|
|
||||||
if (INSTR(x) == op_lab) {
|
if (INSTR(x) == op_lab) {
|
||||||
rm_line(x,b2);
|
rm_line(x,b2);
|
||||||
}
|
}
|
||||||
|
@ -207,13 +204,15 @@ bo_switch(b)
|
||||||
{
|
{
|
||||||
bblock_p s,x;
|
bblock_p s,x;
|
||||||
Lindex i;
|
Lindex i;
|
||||||
line_p l;
|
line_p l,bra;
|
||||||
|
|
||||||
if (Lnrelems(b->b_succ) == 1) {
|
if (Lnrelems(b->b_succ) == 1) {
|
||||||
s = (bblock_p) Lelem(Lfirst(b->b_succ));
|
s = (bblock_p) Lelem(Lfirst(b->b_succ));
|
||||||
if (b->b_start != (line_p) 0 &&
|
if (b->b_start != (line_p) 0 &&
|
||||||
s->b_start != (line_p) 0 &&
|
s->b_start != (line_p) 0 &&
|
||||||
Lnrelems(s->b_pred) == 1 &&
|
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 ||
|
(s->b_next == (bblock_p) 0 ||
|
||||||
!Lis_elem(s->b_next,s->b_succ))) {
|
!Lis_elem(s->b_next,s->b_succ))) {
|
||||||
l = last_code(s->b_start,FALSE);
|
l = last_code(s->b_start,FALSE);
|
||||||
|
|
Loading…
Reference in a new issue