diff options
author | Mark Shannon <mark@hotpy.org> | 2024-01-24 12:08:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 12:08:31 +0000 |
commit | 384429d1c0cf011dcf88d4043e0328de8b063c24 (patch) | |
tree | d3b325f08d9359bce60065b162ddec3572b08662 /Python/bytecodes.c | |
parent | 1e4f00ebd8db44a031b61eed0803b4c3d731aed7 (diff) | |
download | cpython-384429d1c0cf011dcf88d4043e0328de8b063c24.tar.gz cpython-384429d1c0cf011dcf88d4043e0328de8b063c24.zip |
GH-113710: Add a tier 2 peephole optimization pass. (GH-114487)
* Convert _LOAD_CONST to inline versions
* Remove PEP 523 checks
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 7674ff81f64..18749ce60ec 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -4070,6 +4070,10 @@ dummy_func( DEOPT_IF(!current_executor->vm_data.valid); } + op(_LOAD_CONST_INLINE, (ptr/4 -- value)) { + value = Py_NewRef(ptr); + } + op(_LOAD_CONST_INLINE_BORROW, (ptr/4 -- value)) { value = ptr; } |