Skip to content

Commit 7291c49

Browse files
committed
Use g_block_list when resetting stack depth
This ensures we hit all the blocks
1 parent 1eb9226 commit 7291c49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/flowgraph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,10 +2535,10 @@ optimize_load_fast(cfg_builder *g)
25352535
int status;
25362536
ref_stack refs = {0};
25372537
bool *has_killed_refs = NULL;
2538-
basicblock *entryblock = g->g_entryblock;
2539-
for (basicblock *b = entryblock; b != NULL; b = b->b_next) {
2538+
for (basicblock *b = g->g_block_list; b != NULL; b = b->b_list) {
25402539
b->b_startdepth = -1;
25412540
}
2541+
basicblock *entryblock = g->g_entryblock;
25422542
basicblock **blocks = make_cfg_traversal_stack(entryblock);
25432543
if (blocks == NULL) {
25442544
status = ERROR;

0 commit comments

Comments
 (0)