Remove useless conditional branches too.

"if x" jumping to the next statement is pretty useless.
This commit is contained in:
Bill Currie 2012-12-25 13:23:14 +09:00
parent 92fffb3c7e
commit 07187cae7c

View file

@ -1427,7 +1427,8 @@ thread_jumps (sblock_t *blocks)
l->used++; l->used++;
*label = l; *label = l;
} }
if (statement_is_goto (s) && (*label)->dest == sblock->next) { if ((statement_is_goto (s) || statement_is_cond (s))
&& (*label)->dest == sblock->next) {
statement_t **p; statement_t **p;
unuse_label (*label); unuse_label (*label);
for (p = &sblock->statements; *p != s; p = &(*p)->next) for (p = &sblock->statements; *p != s; p = &(*p)->next)