8000 gh-87092: bring compiler code closer to a preprocessing-opt-assembler organisation by iritkatriel · Pull Request #97644 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-87092: bring compiler code closer to a preprocessing-opt-assembler organisation #97644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 5, 2022
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) {
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
0