Closed
Description
Because of the next->b_next
in the loop condition, this does not remove an empty basic block at the end. I put an assert and saw that this can happen.
for (basicblock *b = entryblock; b != NULL; b = b->b_next) { basicblock *next = b->b_next; if (next) { while (next->b_iused == 0 && next->b_next) { next = next->b_next; } b->b_next = next; } }