Skip to content
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

Creation of executable superblocks. #622

Open
markshannon opened this issue Sep 1, 2023 · 0 comments
Open

Creation of executable superblocks. #622

markshannon opened this issue Sep 1, 2023 · 0 comments
Labels
epic-tier2-optimizer Linear code region optimizer for 3.13 and beyond.

Comments

@markshannon
Copy link
Member

Executable superblocks must conform to the Executor interface, and should be able to jump into other superblocks.
These are quite distinct requirements from region selection and optimization.

Therefore, region selection and optimization should use a fixed per-interpreter buffer (maybe per-thread with nogil) from which the data is copied to create the executor.

The optimized region produced by the optimizer consists of a tree, zero or more of leaves of which may jump back to the root.
This format is hard execute efficiently as either all the branches need to compiled or none of them, and as the exits need to efficiently branch to code that does not exist yet.

We should convert the tree into a linear trace with exits to other linear traces. Jumps to the top can be compiled as direct jumps where possible, otherwise as indirect jumps to the primary executor.

See #621 for a design of executors that allows back-patching without self modifying code.

@markshannon markshannon added the epic-tier2-optimizer Linear code region optimizer for 3.13 and beyond. label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic-tier2-optimizer Linear code region optimizer for 3.13 and beyond.
Projects
None yet
Development

No branches or pull requests

1 participant