Skip to content
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

Combine SAVE_IP and SAVE_CURRENT_IP into a new uop #109214

Closed
gvanrossum opened this issue Sep 10, 2023 · 1 comment
Closed

Combine SAVE_IP and SAVE_CURRENT_IP into a new uop #109214

gvanrossum opened this issue Sep 10, 2023 · 1 comment

Comments

@gvanrossum
Copy link
Member

gvanrossum commented Sep 10, 2023

See faster-cpython/ideas#621 (comment):

Now, there's an explicit SAVE_CURRENT_IP in some macros (before every _POP_FRAME and _PUSH_FRAME). That's because it also acts as a flag for the code generator, which, combined with the preceding SAVE_IP, makes it effectively save a pointer to the next instruction (which is what's needed by the frame push/pop uops). But there's so much special-casing here that we might as well either introduce a new uop for the combined special effects or special-case _POP_FRAME and _PUSH_FRAME.

Also rename SAVE_IP to SET_IP (from the same issue). [DONE]

Linked PRs

gvanrossum added a commit that referenced this issue Sep 11, 2023
* Rename SAVE_IP to _SET_IP
* Rename EXIT_TRACE to _EXIT_TRACE
* Rename SAVE_CURRENT_IP to _SAVE_CURRENT_IP
* Rename INSERT to _INSERT (This is for Ken Jin's abstract interpreter)
* Rename IS_NONE to _IS_NONE
* Rename JUMP_TO_TOP to _JUMP_TO_TOP
vstinner pushed a commit to vstinner/cpython that referenced this issue Sep 13, 2023
* Rename SAVE_IP to _SET_IP
* Rename EXIT_TRACE to _EXIT_TRACE
* Rename SAVE_CURRENT_IP to _SAVE_CURRENT_IP
* Rename INSERT to _INSERT (This is for Ken Jin's abstract interpreter)
* Rename IS_NONE to _IS_NONE
* Rename JUMP_TO_TOP to _JUMP_TO_TOP
vstinner pushed a commit to vstinner/cpython that referenced this issue Oct 12, 2023
@gvanrossum
Copy link
Member Author

Looks like this is either done or no longer desirable. Note that SAVE_IP is now _SET_IP and SAVE_CURRENT_IP is now _SAVE_RETURN_OFFSET. The latter is only present before _PUSH_FRAME, not _POP_FRAME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant