FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131798: JIT: Split CALL_TUPLE_1 into several uops by tomasr8 · Pull Request #132851 · python/cpython · GitHub

Repository navigation

gh-131798: JIT: Split CALL_TUPLE_1 into several uops - #132851

Merged
brandtbucher merged 6 commits into
python:mainfrom
tomasr8:jit-call-tuple-1
Apr 24, 2025
Merged

brandtbucher merged 6 commits into
python:mainfrom
tomasr8:jit-call-tuple-1

Conversation

tomasr8 commented Apr 23, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

CALL_TUPLE_1 is equivalent to tuple(...).

Very similar to previous work on splitting up CALL_TYPE_1: #132419
This splits the instruction into a smaller instruction + 2 guards which can be optimized away. This also sets the return type to tuple.

Comment on lines 961 to 964

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Same optimization as in #132849 (comment)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I needed to use UNPACK_SEQUENCE(_TWO)_TUPLE here since it is currently the only uop that propagates the tuple items to the result.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice observation. Seems like _BINARY_OP_SUBSCR_TUPLE_INT could be taught how to do this pretty easily for a constant RHS. Want to add that to your queue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's already in the queue 😄

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL