Skip to content

gh-93008: refactor compiler functions that add instructions to take only a basicblock* (not the whole compiler) #93009

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 4 commits into from
May 29, 2022

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented May 20, 2022

This makes these functions available for use in the optimiser and assembler, when it is necessary to change basic blocks.

Closes #93008.

…ler_use_new_implicit_block_if_needed insted (for the last instr in the block)
…block rather than taking a compiler struct ptr. Rename them to basicblock_add_*
@iritkatriel iritkatriel requested a review from markshannon as a code owner May 20, 2022 11:08
@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 20, 2022
@iritkatriel iritkatriel requested a review from sweeneyde May 20, 2022 11:11
Copy link
Member

@sweeneyde sweeneyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct and makes things a bit more flexible.

Out of interest, what are the use-cases for adding instructions at assembly time?

@iritkatriel
Copy link
Member Author

Looks correct and makes things a bit more flexible.

Out of interest, what are the use-cases for adding instructions at assembly time?

Thanks. I need to do this here line 7465.

@markshannon
Copy link
Member

Looks good.

1 similar comment
@markshannon
Copy link
Member

Looks good.

@iritkatriel iritkatriel merged commit ace6607 into python:main May 29, 2022
@iritkatriel iritkatriel deleted the add_to_block branch October 18, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor compiler so that the low level code generation functions operate on a basicblock*
4 participants