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

gh-148235: remove duplicate uops `_LOAD_CONST_UNDER_INLINE(_BORROW)` in JIT by NekoAsakura · Pull Request #148236 · python/cpython · GitHub

Repository navigation

gh-148235: remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT - #148236

Merged
Fidget-Spinner merged 3 commits into
python:mainfrom
NekoAsakura:gh-148235/dedup-uop
Apr 8, 2026
Merged

Fidget-Spinner merged 3 commits into
python:mainfrom
NekoAsakura:gh-148235/dedup-uop

Conversation

NekoAsakura commented Apr 8, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

Sorry but I'd rather remove LOAD_CONST_UNDER_INLINE_X as the INSERT_X is clearer. Also the tests changes need fixing, thanks!

In the longer-term we should change INSERT_X... to LOAD_CONST_INLINE, SWAP X

NekoAsakura changed the title gh-148235: remove duplicate uops _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT gh-148235: remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT Apr 8, 2026

Copy link
Copy Markdown
Member Author

Done :)

uops = get_opnames(ex)
self.assertNotIn("_UNARY_INVERT", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)
self.assertIn("_LOAD_CONST_INLINE_BORROW", uops)

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

Why this change?

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

_INSERT_1_LOAD_CONST_INLINE_BORROW has no op_without_push entry on main, therefore not simplified away by remove_unneeded_uops.

Comment thread Python/bytecodes.c Outdated
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertNotIn("_REPLACE_WITH_TRUE", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)

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

why this change?

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 reason.

Fidget-Spinner left a comment

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

Thanks

Fidget-Spinner merged commit 7563585 into python:main Apr 8, 2026
78 checks passed
NekoAsakura deleted the gh-148235/dedup-uop branch April 8, 2026 12:10
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL