-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-114265: remove i_loc_propagated, jump threading does not consider line numbers anymore #114535
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
…sider line numbers anymore
expected_insts = [ | ||
('LOAD_NAME', 0, 10), | ||
('NOP', 0, 4), | ||
(op2, 0, 5), | ||
(op, 0, 5), |
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.
The expected output was wrong here (and there was a bug) - in the case of 'JUMP' --> 'JUMP_NO_INTERRUPT' we were previously ending up with 'JUMP_NO_INTERRUPT', but we want it to be 'JUMP'.
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.
Nice improvement.
|
…sider line numbers anymore (python#114535)
…sider line numbers anymore (python#114535)
This simplifies jump threading: instead of trying to figure out whether the new and old jumps have the same line numbers, it replaces the first jump by a NOP and adds another instruction after it for the threaded jump (with the target's line number). The NOP will be removed later if it's not necessary.
After this we don't need i_loc_propagated anymore.