Skip to content
Merged
Prev Previous commit
Next Next commit
move push_cold_blocks_to_end up
  • Loading branch information
iritkatriel committed Sep 29, 2022
commit 9736e75ec237973802dbe7aae44a001a443edb59
6 changes: 3 additions & 3 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -8649,6 +8649,9 @@ assemble(struct compiler *c, int addNone)
if (duplicate_exits_without_lineno(g) < 0) {
goto error;
}
if (push_cold_blocks_to_end(g, code_flags) < 0) {
Comment thread
iritkatriel marked this conversation as resolved.
goto error;
}
propagate_line_numbers(g->g_entryblock);
guarantee_lineno_for_exits(g->g_entryblock, c->u->u_firstlineno);

Expand All @@ -8660,9 +8663,6 @@ assemble(struct compiler *c, int addNone)

convert_exception_handlers_to_nops(g->g_entryblock);

if (push_cold_blocks_to_end(g, code_flags) < 0) {
goto error;
}
for (basicblock *b = g->g_entryblock; b != NULL; b = b->b_next) {
remove_redundant_nops(b);
}
Expand Down