mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-130704: Strength reduce LOAD_FAST{_LOAD_FAST}
(#130708)
Optimize `LOAD_FAST` opcodes into faster versions that load borrowed references onto the operand stack when we can prove that the lifetime of the local outlives the lifetime of the temporary that is loaded onto the stack.
This commit is contained in:
parent
e9556e1004
commit
053c285f6b
35 changed files with 1282 additions and 345 deletions
68
Include/opcode_ids.h
generated
68
Include/opcode_ids.h
generated
|
@ -94,39 +94,41 @@ extern "C" {
|
|||
#define LOAD_DEREF 81
|
||||
#define LOAD_FAST 82
|
||||
#define LOAD_FAST_AND_CLEAR 83
|
||||
#define LOAD_FAST_CHECK 84
|
||||
#define LOAD_FAST_LOAD_FAST 85
|
||||
#define LOAD_FROM_DICT_OR_DEREF 86
|
||||
#define LOAD_FROM_DICT_OR_GLOBALS 87
|
||||
#define LOAD_GLOBAL 88
|
||||
#define LOAD_NAME 89
|
||||
#define LOAD_SMALL_INT 90
|
||||
#define LOAD_SPECIAL 91
|
||||
#define LOAD_SUPER_ATTR 92
|
||||
#define MAKE_CELL 93
|
||||
#define MAP_ADD 94
|
||||
#define MATCH_CLASS 95
|
||||
#define POP_JUMP_IF_FALSE 96
|
||||
#define POP_JUMP_IF_NONE 97
|
||||
#define POP_JUMP_IF_NOT_NONE 98
|
||||
#define POP_JUMP_IF_TRUE 99
|
||||
#define RAISE_VARARGS 100
|
||||
#define RERAISE 101
|
||||
#define SEND 102
|
||||
#define SET_ADD 103
|
||||
#define SET_FUNCTION_ATTRIBUTE 104
|
||||
#define SET_UPDATE 105
|
||||
#define STORE_ATTR 106
|
||||
#define STORE_DEREF 107
|
||||
#define STORE_FAST 108
|
||||
#define STORE_FAST_LOAD_FAST 109
|
||||
#define STORE_FAST_STORE_FAST 110
|
||||
#define STORE_GLOBAL 111
|
||||
#define STORE_NAME 112
|
||||
#define SWAP 113
|
||||
#define UNPACK_EX 114
|
||||
#define UNPACK_SEQUENCE 115
|
||||
#define YIELD_VALUE 116
|
||||
#define LOAD_FAST_BORROW 84
|
||||
#define LOAD_FAST_BORROW_LOAD_FAST_BORROW 85
|
||||
#define LOAD_FAST_CHECK 86
|
||||
#define LOAD_FAST_LOAD_FAST 87
|
||||
#define LOAD_FROM_DICT_OR_DEREF 88
|
||||
#define LOAD_FROM_DICT_OR_GLOBALS 89
|
||||
#define LOAD_GLOBAL 90
|
||||
#define LOAD_NAME 91
|
||||
#define LOAD_SMALL_INT 92
|
||||
#define LOAD_SPECIAL 93
|
||||
#define LOAD_SUPER_ATTR 94
|
||||
#define MAKE_CELL 95
|
||||
#define MAP_ADD 96
|
||||
#define MATCH_CLASS 97
|
||||
#define POP_JUMP_IF_FALSE 98
|
||||
#define POP_JUMP_IF_NONE 99
|
||||
#define POP_JUMP_IF_NOT_NONE 100
|
||||
#define POP_JUMP_IF_TRUE 101
|
||||
#define RAISE_VARARGS 102
|
||||
#define RERAISE 103
|
||||
#define SEND 104
|
||||
#define SET_ADD 105
|
||||
#define SET_FUNCTION_ATTRIBUTE 106
|
||||
#define SET_UPDATE 107
|
||||
#define STORE_ATTR 108
|
||||
#define STORE_DEREF 109
|
||||
#define STORE_FAST 110
|
||||
#define STORE_FAST_LOAD_FAST 111
|
||||
#define STORE_FAST_STORE_FAST 112
|
||||
#define STORE_GLOBAL 113
|
||||
#define STORE_NAME 114
|
||||
#define SWAP 115
|
||||
#define UNPACK_EX 116
|
||||
#define UNPACK_SEQUENCE 117
|
||||
#define YIELD_VALUE 118
|
||||
#define RESUME 128
|
||||
#define BINARY_OP_ADD_FLOAT 129
|
||||
#define BINARY_OP_ADD_INT 130
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue