mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
GH-118093: Add tier two support to several instructions (GH-121884)
This commit is contained in:
parent
7dd52b63ce
commit
7b36b67b1e
11 changed files with 372 additions and 108 deletions
48
Python/optimizer_cases.c.h
generated
48
Python/optimizer_cases.c.h
generated
|
@ -644,7 +644,11 @@
|
|||
|
||||
/* _SEND is not a viable micro-op for tier 2 */
|
||||
|
||||
/* _SEND_GEN is not a viable micro-op for tier 2 */
|
||||
case _SEND_GEN_FRAME: {
|
||||
// We are about to hit the end of the trace:
|
||||
ctx->done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
/* _INSTRUMENTED_YIELD_VALUE is not a viable micro-op for tier 2 */
|
||||
|
||||
|
@ -787,7 +791,14 @@
|
|||
|
||||
/* _LOAD_FROM_DICT_OR_GLOBALS is not a viable micro-op for tier 2 */
|
||||
|
||||
/* _LOAD_NAME is not a viable micro-op for tier 2 */
|
||||
case _LOAD_NAME: {
|
||||
_Py_UopsSymbol *v;
|
||||
v = sym_new_not_null(ctx);
|
||||
stack_pointer[0] = v;
|
||||
stack_pointer += 1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _LOAD_GLOBAL: {
|
||||
_Py_UopsSymbol *res;
|
||||
|
@ -910,7 +921,14 @@
|
|||
break;
|
||||
}
|
||||
|
||||
/* _BUILD_SET is not a viable micro-op for tier 2 */
|
||||
case _BUILD_SET: {
|
||||
_Py_UopsSymbol *set;
|
||||
set = sym_new_not_null(ctx);
|
||||
stack_pointer[-oparg] = set;
|
||||
stack_pointer += 1 - oparg;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _BUILD_MAP: {
|
||||
_Py_UopsSymbol *map;
|
||||
|
@ -1307,6 +1325,24 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _IMPORT_NAME: {
|
||||
_Py_UopsSymbol *res;
|
||||
res = sym_new_not_null(ctx);
|
||||
stack_pointer[-2] = res;
|
||||
stack_pointer += -1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _IMPORT_FROM: {
|
||||
_Py_UopsSymbol *res;
|
||||
res = sym_new_not_null(ctx);
|
||||
stack_pointer[0] = res;
|
||||
stack_pointer += 1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
/* _POP_JUMP_IF_FALSE is not a viable micro-op for tier 2 */
|
||||
|
||||
/* _POP_JUMP_IF_TRUE is not a viable micro-op for tier 2 */
|
||||
|
@ -1846,6 +1882,12 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _CALL_LIST_APPEND: {
|
||||
stack_pointer += -3;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _CALL_METHOD_DESCRIPTOR_O: {
|
||||
_Py_UopsSymbol *res;
|
||||
res = sym_new_not_null(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue