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

Tier 2 abstract interpreter for the optimizer #107557

Open
2 tasks
Fidget-Spinner opened this issue Aug 2, 2023 · 0 comments
Open
2 tasks

Tier 2 abstract interpreter for the optimizer #107557

Fidget-Spinner opened this issue Aug 2, 2023 · 0 comments
Labels
performance Performance or resource usage type-feature A feature request or enhancement

Comments

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commented Aug 2, 2023

Feature or enhancement

(Mega issue) Start doing optimization passes on tier 2 bytecode.

Pitch

The target of tier 2 optimizations is tier 2 bytecode. Abstract interpretation is a natural way to analyze and optimize tier 2 bytecode. We can generate the abstract interpreter from the bytecode DSL

Previous discussion

See faster-cpython/ideas#611

Todo list:

  • Generate a barebones tier 2 abstract interpreter from the DSL.
  • Perform partial evaluation. For now, all static comes from LOAD_CONST. Assume everything else is dynamic.

The initial partial evaluation will be bad because it does not have that much static information (we need watchers for methods, functions, global, etc., to make them effectively static). However, that phase can be done in the region formation step before partial evaluation. Someone else can pick them up as a parallel workstream.

Linked PRs

@Fidget-Spinner Fidget-Spinner added the type-feature A feature request or enhancement label Aug 2, 2023
Fidget-Spinner added a commit to Fidget-Spinner/cpython that referenced this issue Aug 2, 2023
@Fidget-Spinner Fidget-Spinner added the performance Performance or resource usage label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant