8000 propagate only if false · iritkatriel/cpython@63e5c9c · GitHub
[go: up one dir, main page]

Skip to content

Commit 63e5c9c

Browse files
committed
propagate only if false
1 parent bfd13f1 commit 63e5c9c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Python/flowgraph.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,16 @@ basicblock_remove_redundant_nops(basicblock *bb) {
10321032
cfg_instr *next_instr = &bb->b_instr[src + 1];
10331033
int next_lineno = next_instr->i_loc.lineno;
10341034
if (next_lineno == lineno) {
1035-
next_instr->i_loc_propagated = src_instr->i_loc_propagated;
1035+
if (!src_instr->i_loc_propagated) {
1036+
next_instr->i_loc_propagated = 0;
1037+
}
10361038
continue;
10371039
}
10381040
if (next_lineno < 0) {
10391041
next_instr->i_loc = src_instr->i_loc;
1040-
next_instr->i_loc_propagated = src_instr->i_loc_propagated;
1042+
if (!src_instr->i_loc_propagated) {
1043+
next_instr->i_loc_propagated = 0;
1044+
}
10411045
continue;
10421046
}
10431047
}
@@ -1057,7 +1061,9 @@ basicblock_remove_redundant_nops(basicblock *bb) {
10571061
break;
10581062
}
10591063
if (next_instr && lineno == next_instr->i_loc.lineno) {
1060-
next_instr->i_loc_propagated = src_instr->i_loc_propagated;
1064+
if (!src_instr->i_loc_propagated) {
1065+
next_instr->i_loc_propagated = 0;
1066+
}
10611067
continue;
10621068
}
10631069
}

0 commit comments

Comments
 (0)
0