From 384429d1c0cf011dcf88d4043e0328de8b063c24 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 24 Jan 2024 12:08:31 +0000 Subject: GH-113710: Add a tier 2 peephole optimization pass. (GH-114487) * Convert _LOAD_CONST to inline versions * Remove PEP 523 checks --- Python/bytecodes.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/bytecodes.c') 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; } -- cgit v1.2.3