GH-131798: Split CALL_LIST_APPEND into several uops (GH-134240)

This commit is contained in:
Diego Russo 2025-05-19 15:48:55 -04:00 committed by GitHub
parent 92f85ff3a0
commit 42d03f3933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 370 additions and 259 deletions

View file

@ -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());