Skip to content

Commit 7d0d0d9

Browse files
DinoVfacebook-github-bot
authored andcommitted
Add patch 'load-fast-borrowed-opt'
Summary: This diff adds a patch to the `3.14` Meta-internal fork. Fix issue where LOAD_FAST_BORROWED doesn't get applied past an empty basic block Reviewed By: itamaro Differential Revision: D81341134 fbshipit-source-id: 54c02f6604c0e5e0a638722ebec4a5586fd82c5e
1 parent c0e57dd commit 7d0d0d9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Python/flowgraph.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2982,10 +2982,8 @@ optimize_load_fast(cfg_builder *g)
29822982

29832983
// Push fallthrough block
29842984
cfg_instr *term = basicblock_last_instr(block);
2985-
if (term != NULL && block->b_next != NULL &&
2986-
!(IS_UNCONDITIONAL_JUMP_OPCODE(term->i_opcode) ||
2987-
IS_SCOPE_EXIT_OPCODE(term->i_opcode))) {
2988-
assert(BB_HAS_FALLTHROUGH(block));
2985+
if (BB_HAS_FALLTHROUGH(block)) {
2986+
assert(block->b_next != NULL);
29892987
load_fast_push_block(&sp, block->b_next, refs.size);
29902988
}
29912989

0 commit comments

Comments
 (0)