gh-148235: remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT (GH-148236)

This commit is contained in:
Neko Asakura 2026-04-08 16:22:59 +08:00 committed by GitHub
parent 8923ca418c
commit 756358524e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1088 additions and 1288 deletions

View file

@ -21643,120 +21643,6 @@
break;
}
case _LOAD_CONST_UNDER_INLINE_r02: {
CHECK_CURRENT_CACHED_VALUES(0);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
old = stack_pointer[-1];
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectNew(ptr);
_tos_cache1 = new;
_tos_cache0 = value;
SET_CURRENT_CACHED_VALUES(2);
stack_pointer += -1;
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _LOAD_CONST_UNDER_INLINE_r12: {
CHECK_CURRENT_CACHED_VALUES(1);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
_PyStackRef _stack_item_0 = _tos_cache0;
old = _stack_item_0;
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectNew(ptr);
_tos_cache1 = new;
_tos_cache0 = value;
SET_CURRENT_CACHED_VALUES(2);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _LOAD_CONST_UNDER_INLINE_r23: {
CHECK_CURRENT_CACHED_VALUES(2);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
_PyStackRef _stack_item_0 = _tos_cache0;
_PyStackRef _stack_item_1 = _tos_cache1;
old = _stack_item_1;
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectNew(ptr);
_tos_cache2 = new;
_tos_cache1 = value;
_tos_cache0 = _stack_item_0;
SET_CURRENT_CACHED_VALUES(3);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _LOAD_CONST_UNDER_INLINE_BORROW_r02: {
CHECK_CURRENT_CACHED_VALUES(0);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
old = stack_pointer[-1];
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectBorrow(ptr);
_tos_cache1 = new;
_tos_cache0 = value;
SET_CURRENT_CACHED_VALUES(2);
stack_pointer += -1;
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _LOAD_CONST_UNDER_INLINE_BORROW_r12: {
CHECK_CURRENT_CACHED_VALUES(1);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
_PyStackRef _stack_item_0 = _tos_cache0;
old = _stack_item_0;
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectBorrow(ptr);
_tos_cache1 = new;
_tos_cache0 = value;
SET_CURRENT_CACHED_VALUES(2);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _LOAD_CONST_UNDER_INLINE_BORROW_r23: {
CHECK_CURRENT_CACHED_VALUES(2);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
_PyStackRef old;
_PyStackRef value;
_PyStackRef new;
_PyStackRef _stack_item_0 = _tos_cache0;
_PyStackRef _stack_item_1 = _tos_cache1;
old = _stack_item_1;
PyObject *ptr = (PyObject *)CURRENT_OPERAND0_64();
new = old;
value = PyStackRef_FromPyObjectBorrow(ptr);
_tos_cache2 = new;
_tos_cache1 = value;
_tos_cache0 = _stack_item_0;
SET_CURRENT_CACHED_VALUES(3);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
break;
}
case _START_EXECUTOR_r00: {
CHECK_CURRENT_CACHED_VALUES(0);
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());