Repository navigation
gh-100239: Specialize binary operations using BINARY_OP_EXTEND #128956
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
02ca84d
specialize concatenation of lists and tuples
eendebakpt 27f4c56
📜🤖 Added by blurb_it.
blurb-it[bot] 51d1b11
refactor for type information
eendebakpt e8263f9
add unique type propagation
eendebakpt 77c1558
Merge branch 'main' into binary_op_list_list
eendebakpt fe63c59
special case for concatenation
eendebakpt f099585
fix
eendebakpt 7f2c4a0
Merge branch 'main' into binary_op_list_list
eendebakpt d2dcb87
add asserts
eendebakpt 6b0e5ed
review comments: reduce number of guards
eendebakpt d3f2d9d
review comments: reduce number of guards
eendebakpt 49459c4
review comments: only guard on rhs or lhs if needed
eendebakpt 72e8ab8
update tests
eendebakpt 652286a
mark tier2 ops
eendebakpt 6dc2e3c
Merge branch 'main' into binary_op_list_list
eendebakpt 0b8dfee
Merge branch 'main' into binary_op_list_list
eendebakpt 430248c
fix: pass descriptor to _GUARD_BINARY_OP_EXTEND_{LHS,RHS} in tier2 op…
eendebakpt a018c03
Regenerate optimizer_cases.c.h with descriptor operand fix
eendebakpt d6740d7
Merge branch 'main' into binary_op_list_list
eendebakpt 538d072
fix ADD_OP
eendebakpt c390a03
Merge branch 'main' into binary_op_list_list
eendebakpt b2cb6b1
remove indirection
eendebakpt 8d5e201
Merge remote-tracking branch 'origin/main' into binary_op_list_list
eendebakpt 027fc39
Merge branch 'main' into binary_op_list_list
eendebakpt cdaf82f
Merge branch 'main' into binary_op_list_list
eendebakpt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
special case for concatenation
- Loading branch information
commit fe63c59490524e5e967fec380478765a946fd9f4
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -409,6 +409,16 @@ dummy_func(void) { | |
| r = right; | ||
| } | ||
|
|
||
| op(_GUARD_BINARY_OP_EXTEND, (descr/4, left, right -- left, right)) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is potential to optimize out the |
||
| _PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr *)descr; | ||
| if (d != NULL && d->lhs_type != NULL && d->rhs_type != NULL) { | ||
| if (sym_matches_type(left, d->lhs_type) && | ||
| sym_matches_type(right, d->rhs_type)) { | ||
| REPLACE_OP(this_instr, _NOP, 0, 0); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| op(_BINARY_OP_EXTEND, (descr/4, left, right -- res, l, r)) { | ||
| _PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr *)descr; | ||
| if (d != NULL && d->result_type != NULL) { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.