GH-88691: Shrink the CALL caches (GH-103230)

This commit is contained in:
Brandt Bucher 2023-04-05 14:15:49 -07:00 committed by GitHub
parent aa5a9b5eb7
commit b4978ff872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 285 additions and 281 deletions

View file

@ -695,7 +695,7 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
}
#endif
enum InstructionFormat { INSTR_FMT_IB, INSTR_FMT_IBC, INSTR_FMT_IBC000, INSTR_FMT_IBC00000000, INSTR_FMT_IBIB, INSTR_FMT_IX, INSTR_FMT_IXC, INSTR_FMT_IXC000 };
enum InstructionFormat { INSTR_FMT_IB, INSTR_FMT_IBC, INSTR_FMT_IBC00, INSTR_FMT_IBC000, INSTR_FMT_IBC00000000, INSTR_FMT_IBIB, INSTR_FMT_IX, INSTR_FMT_IXC, INSTR_FMT_IXC000 };
struct opcode_metadata {
bool valid_entry;
enum InstructionFormat instr_format;
@ -844,24 +844,24 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[256] = {
[LOAD_ATTR_METHOD_NO_DICT] = { true, INSTR_FMT_IBC00000000 },
[LOAD_ATTR_METHOD_LAZY_DICT] = { true, INSTR_FMT_IBC00000000 },
[KW_NAMES] = { true, INSTR_FMT_IB },
[CALL] = { true, INSTR_FMT_IBC000 },
[CALL_BOUND_METHOD_EXACT_ARGS] = { true, INSTR_FMT_IBC000 },
[CALL_PY_EXACT_ARGS] = { true, INSTR_FMT_IBC000 },
[CALL_PY_WITH_DEFAULTS] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_TYPE_1] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_STR_1] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_TUPLE_1] = { true, INSTR_FMT_IBC000 },
[CALL_BUILTIN_CLASS] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_BUILTIN_O] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_BUILTIN_FAST] = { true, INSTR_FMT_IBC000 },
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_LEN] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_ISINSTANCE] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_LIST_APPEND] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_METHOD_DESCRIPTOR_O] = { true, INSTR_FMT_IBC000 },
[CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS] = { true, INSTR_FMT_IBC000 },
[CALL_NO_KW_METHOD_DESCRIPTOR_FAST] = { true, INSTR_FMT_IBC000 },
[CALL] = { true, INSTR_FMT_IBC00 },
[CALL_BOUND_METHOD_EXACT_ARGS] = { true, INSTR_FMT_IBC00 },
[CALL_PY_EXACT_ARGS] = { true, INSTR_FMT_IBC00 },
[CALL_PY_WITH_DEFAULTS] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_TYPE_1] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_STR_1] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_TUPLE_1] = { true, INSTR_FMT_IBC00 },
[CALL_BUILTIN_CLASS] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_BUILTIN_O] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_BUILTIN_FAST] = { true, INSTR_FMT_IBC00 },
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_LEN] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_ISINSTANCE] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_LIST_APPEND] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_METHOD_DESCRIPTOR_O] = { true, INSTR_FMT_IBC00 },
[CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS] = { true, INSTR_FMT_IBC00 },
[CALL_NO_KW_METHOD_DESCRIPTOR_FAST] = { true, INSTR_FMT_IBC00 },
[CALL_FUNCTION_EX] = { true, INSTR_FMT_IB },
[MAKE_FUNCTION] = { true, INSTR_FMT_IB },
[RETURN_GENERATOR] = { true, INSTR_FMT_IX },