Skip to content

Commit

Permalink
no need to eliminate empty blocks in duplicate_exits_without_lineno
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Sep 9, 2022
1 parent 349cc45 commit 42a7525
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -9623,12 +9623,9 @@ duplicate_exits_without_lineno(cfg_builder *g)
}
}
}
/* Eliminate empty blocks */
for (basicblock *b = entryblock; b != NULL; b = b->b_next) {
while (b->b_next && b->b_next->b_iused == 0) {
b->b_next = b->b_next->b_next;
}
}

assert(no_empty_basic_blocks(g));

/* Any remaining reachable exit blocks without line number can only be reached by
* fall through, and thus can only have a single predecessor */
for (basicblock *b = entryblock; b != NULL; b = b->b_next) {
Expand Down

0 comments on commit 42a7525

Please sign in to comment.