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

Remove redundant fields from basicblock: b_nofallthrough, b_exit, b_return #93444

Closed
iritkatriel opened this issue Jun 2, 2022 · 0 comments · Fixed by #93445
Closed

Remove redundant fields from basicblock: b_nofallthrough, b_exit, b_return #93444

iritkatriel opened this issue Jun 2, 2022 · 0 comments · Fixed by #93445
Assignees
Labels
interpreter-core

Comments

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jun 2, 2022

The fields b_nofallthrough, b_exit, b_return in the compiler's basicblock can be easily calculated form the opcode of the last instruction in the block, so we can remove them.

This change is in line with our general move to simplify the compiler front end by not making it calculate things that the backend can deduce. It increases safety because the cached values need to be kept correct through transformations/optimisations of the block, and this adds opportunities for bugs.

@iritkatriel iritkatriel added the interpreter-core label Jun 2, 2022
@iritkatriel iritkatriel self-assigned this Jun 2, 2022
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core
Projects
None yet
1 participant