-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-116596: Better determination of escaping uops. #116597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Tier 1 it's NOP. In Tier 2 it's _NOP
. The original code worked because they are currently the same value (as are all opcodes that are shared between T1 and T2). But eventually we may want all the Tier 2 opcodes to be distinct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification!
Any uop marked as escaping forces a
_SET_IP
before it and a_CHECK_VALIDITY
afterwards, which is expensive.This PR removes some false positives, where a uop is marked as escaping but does not.