GH-116596: Better determination of escaping uops. (GH-116597)

This commit is contained in:
Mark Shannon 2024-03-11 13:37:48 +00:00 committed by GitHub
parent 6c4fc209e1
commit b6ae6da1bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 30 deletions

View file

@ -430,7 +430,7 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
int opcode = buffer[pc].opcode;
switch (opcode) {
case _SET_IP:
buffer[pc].opcode = NOP;
buffer[pc].opcode = _NOP;
last_set_ip = pc;
break;
case _CHECK_VALIDITY:
@ -438,7 +438,7 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
may_have_escaped = false;
}
else {
buffer[pc].opcode = NOP;
buffer[pc].opcode = _NOP;
}
break;
case _CHECK_VALIDITY_AND_SET_IP:
@ -447,7 +447,7 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
buffer[pc].opcode = _CHECK_VALIDITY;
}
else {
buffer[pc].opcode = NOP;
buffer[pc].opcode = _NOP;
}
last_set_ip = pc;
break;
@ -463,7 +463,7 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
last->opcode == _COPY
) {
last->opcode = _NOP;
buffer[pc].opcode = NOP;
buffer[pc].opcode = _NOP;
}
if (last->opcode == _REPLACE_WITH_TRUE) {
last->opcode = _NOP;