The Wayback Machine - https://web.archive.org/web/20221223175401/https://github.com/python/cpython/pull/96713
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

gh-87092: reduce redundancy and repetition in compiler's optimization stage #96713

Merged
merged 10 commits into from Sep 13, 2022

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Sep 9, 2022

  • replace calls to eliminate_empty_basic_blocks by an assertion that there are no empty blocks
  • same for a couple of inlined copies of the eliminate_empty_basic_blocks logic
  • rename clean_basic_block --> remove_redundant_nops for clarity
  • rename normalize_basic_block --> check_cfg and reduce it to only check (not remove empty blocks).
  • rename extend_block --> inline_small_exit_blocks. Make it inline blocks with linenos too (as it used to until bde06e1).
  • use the IS_UNCONDITIONAL_JUMP_OPCODE macro in a couple of places instead of checking precise opcodes

@iritkatriel iritkatriel added skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.12 labels Sep 9, 2022
@iritkatriel iritkatriel requested a review from markshannon as a code owner Sep 9, 2022
@iritkatriel iritkatriel self-assigned this Sep 9, 2022
Python/compile.c Outdated Show resolved Hide resolved
@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 9, 2022
@bedevere-bot
Copy link

bedevere-bot commented Sep 9, 2022

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 42a7525 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 9, 2022
@iritkatriel iritkatriel requested a review from brandtbucher as a code owner Sep 9, 2022
@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 9, 2022
@bedevere-bot
Copy link

bedevere-bot commented Sep 9, 2022

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit d06fd46 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 9, 2022
@iritkatriel
Copy link
Member Author

iritkatriel commented Sep 10, 2022

@markshannon buildbots all pass with this. Any further comments?

@iritkatriel iritkatriel requested a review from sweeneyde Sep 12, 2022
Python/compile.c Outdated Show resolved Hide resolved
@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 12, 2022
@bedevere-bot
Copy link

bedevere-bot commented Sep 12, 2022

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit cf6d362 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 12, 2022
Copy link
Member

@markshannon markshannon left a comment

A couple of questions

Python/compile.c Outdated Show resolved Hide resolved
Python/compile.c Show resolved Hide resolved
@markshannon markshannon self-requested a review Sep 13, 2022
@iritkatriel iritkatriel merged commit 6d7a0e0 into python:main Sep 13, 2022
12 checks passed
@iritkatriel iritkatriel deleted the compiler_assertions branch Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants