Skip to content

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

Merged
iritkatriel merged 4 commits into
python:mainfrom
iritkatriel:add_to_block
May 29, 2022
Merged

gh-93008: refactor compiler functions that add instructions to take only a basicblock* (not the whole compiler)#93009
iritkatriel merged 4 commits into
python:mainfrom
iritkatriel:add_to_block

Conversation

@iritkatriel

@iritkatriel iritkatriel commented May 20, 2022

Copy link
Copy Markdown
Member

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

@sweeneyde sweeneyde left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

Looks good.

1 similar comment
@markshannon

Copy link
Copy Markdown
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