mirror of
https://github.com/python/cpython.git
synced 2025-09-07 01:11:26 +00:00
GH-131798: Split CALL_LIST_APPEND into several uops (GH-134240)
This commit is contained in:
parent
92f85ff3a0
commit
42d03f3933
10 changed files with 370 additions and 259 deletions
21
Python/optimizer_cases.c.h
generated
21
Python/optimizer_cases.c.h
generated
|
@ -1935,6 +1935,16 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _GUARD_NOS_NOT_NULL: {
|
||||
JitOptSymbol *nos;
|
||||
nos = stack_pointer[-2];
|
||||
if (sym_is_not_null(nos)) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
}
|
||||
sym_set_non_null(nos);
|
||||
break;
|
||||
}
|
||||
|
||||
case _GUARD_THIRD_NULL: {
|
||||
JitOptSymbol *null;
|
||||
null = stack_pointer[-3];
|
||||
|
@ -2146,6 +2156,17 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _GUARD_CALLABLE_LIST_APPEND: {
|
||||
JitOptSymbol *callable;
|
||||
callable = stack_pointer[-3];
|
||||
PyObject *list_append = _PyInterpreterState_GET()->callable_cache.list_append;
|
||||
if (sym_get_const(ctx, callable) == list_append) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
}
|
||||
sym_set_const(callable, list_append);
|
||||
break;
|
||||
}
|
||||
|
||||
case _CALL_LIST_APPEND: {
|
||||
stack_pointer += -3;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue