Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-104584: Allow unspecialized instructions in superblocks #106497

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 5 commits into from
Jul 7, 2023

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jul 6, 2023

This is done by not searching for forbidden words inside #if ENABLE_SPECIALIZATION. (And making that flag false when the Tier 2 uops are being compiled.)

@markshannon, I know this is controversial, but while we are incrementally developing superblock generation, I find it helpful if there are as many superblocks as possible, and those are as long as possible. Allowing unspecialized instructions helps towards this goal (and is quicker than inventing new specializations). I'm making it its own PR so hopefully it will be easy to roll back in the future. (In fact, all you'd have to do is change the one call to variable_used_unspecialized in generate_cases.py back to variable_used, and regenerate.)

This adds a whole bunch of unspecialized opcodes to superblocks.
While we may not want that eventually, for now this helps finding bugs.
@markshannon
Copy link
Member

markshannon commented Jul 7, 2023

I'm hoping that our specialization will become good enough that it will be become largely irrelevant whether we include unspecialized instructions or not.

If it helps testing, then let's add them. As you say, we can also remove them later if they are a problem.

@gvanrossum gvanrossum enabled auto-merge (squash) July 7, 2023 16:47
@gvanrossum gvanrossum merged commit b3648f0 into python:main Jul 7, 2023
@gvanrossum gvanrossum deleted the unspecialized-uops branch July 7, 2023 18:05
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