mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
Revert "GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.
This reverts commit ab61d3f430
.
This commit is contained in:
parent
d7d066c3ab
commit
a10f99375e
44 changed files with 1679 additions and 1460 deletions
|
@ -1836,6 +1836,12 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
|
|||
INSTR_SET_OP0(inst, NOP);
|
||||
}
|
||||
break;
|
||||
case LOAD_GLOBAL:
|
||||
if (nextop == PUSH_NULL && (oparg & 1) == 0) {
|
||||
INSTR_SET_OP1(inst, LOAD_GLOBAL, oparg | 1);
|
||||
INSTR_SET_OP0(&bb->b_instr[i + 1], NOP);
|
||||
}
|
||||
break;
|
||||
case COMPARE_OP:
|
||||
if (nextop == TO_BOOL) {
|
||||
INSTR_SET_OP0(inst, NOP);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue