Do not unconditionally remove labels from blocks.

Labels can be shared between multiple flow-control instructions, so use the
label's used counter to determine when to remove the label. This was
causing problems with the jump threading.
This commit is contained in:
Bill Currie 2012-05-03 19:22:57 +09:00
parent c79620f04c
commit ab73a267cd
1 changed files with 2 additions and 1 deletions

View File

@ -1108,7 +1108,8 @@ remove_dead_blocks (sblock_t *blocks)
label = s->opa->o.label;
else if (!strncmp (s->opcode, "<IF", 3))
label = s->opb->o.label;
remove_label_from_dest (label);
if (label && !--label->used)
remove_label_from_dest (label);
did_something = 1;
sblock->next = sb->next;