{{ message }}
gh-106290: Fix edge cases around uops - #106319
Merged
Merged
Conversation
- Longer traces - Explain reason for ending a trace - Support STORE_FAST_LOAD_FAST, STORE_FAST_STORE_FAST - Add deps on pycore_uops.h
This gives us LOAD_FAST_CHECK, LOAD_CLOSURE, and DELETE_FAST.
This doesn't work right yet, alas. If an error occurs in the first uop, the lineno is -1.
The trick is that EXIT_TRACE must decrement prev_instr.
Member
Author
Member
Author
|
This (with uops on by default) benchmarks 2% slower than main (with uops off by default). I will now revert the final (temporary) commit that turns on uops by default and mark it as ready for review. |
(I just did that to be able to benchmark it and run the tests.) This reverts commit 5b85a49.
Member
Author
Member
Author
|
Maybe the leak is the optimizer created and installed initially. |
brandtbucher
approved these changes
Jul 3, 2023
brandtbucher
left a comment
Member
There was a problem hiding this comment.
The code itself looks good, haven't tried running it myself or anything. Just one note:
| return 0; | ||
|
|
||
| #undef ADD_TO_TRACE | ||
| #undef ADD_TO_TRACE_BASIC |
Member
There was a problem hiding this comment.
I don't see where this is defined...
Member
Author
There was a problem hiding this comment.
Turd from the last cleanup. I'll get rid of it, then land it.
Use it to `#undef DPRINTF` instead (which also depends on a variable in this scope).
gvanrossum
enabled auto-merge (squash)
July 3, 2023 19:29
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.

A bit of an omnibus PR, alas (let me know if you want it split up). This does roughly the following (though not in that order):
SET_IPtoSAVE_IP(per Creation of superblocks faster-cpython/ideas#558)SAVE_IPuop at the start of the trace (ditto)unbound_local_error; this gives us uops forLOAD_FAST_CHECK,LOAD_CLOSURE, andDELETE_FASTSTORE_FAST_LOAD_FAST,STORE_FAST_STORE_FAST