gh-148211: decompose _POP_TOP_LOAD_CONST_INLINE(_BORROW) in JIT#148230
Merged
Fidget-Spinner merged 4 commits intopython:mainfrom Apr 8, 2026
Merged
gh-148211: decompose _POP_TOP_LOAD_CONST_INLINE(_BORROW) in JIT#148230Fidget-Spinner merged 4 commits intopython:mainfrom
_POP_TOP_LOAD_CONST_INLINE(_BORROW) in JIT#148230Fidget-Spinner merged 4 commits intopython:mainfrom
Conversation
Member
|
Feel free to remove the composite uops altogether, including removing them from |
Member
|
Ah wait, it seems this is quite hard to remove from the unneeded ops pass without modifying it heavily. So let's skip that for now. Thanks! |
Member
|
Please fix the merge conflicts from the other PR. Thank you! |
Contributor
Author
|
Done :) |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The composite uop definitions in
bytecodes.care kept for now —remove_unneeded_uopsstill produces them as intermediate forms during push/pop cancellation.cpython/Python/optimizer_analysis.c
Lines 610 to 653 in 4ff8b07
Specifically, these composites chain through
_POP_TOP_LOAD_CONST_INLINE_BORROWin theop_without_push/op_without_pop/op_without_pop_nulltables:_POP_TWO_LOAD_CONST_INLINE_BORROW_POP_CALL_LOAD_CONST_INLINE_BORROW_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW_SHUFFLE_2_LOAD_CONST_INLINE_BORROWAdditionally,
_LOAD_CONST_UNDER_INLINE(_BORROW)references_POP_TOP_LOAD_CONST_INLINE(_BORROW)as a target inop_without_push— those table entries would need updating too.Once these dependents are decomposed, the definitions can be fully removed.