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

feat[venom]: common subexpression elimination pass #4241

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

HodanPlodky
Copy link
Contributor

What I did

Created common subexpression elimination pass

How I did it

Created available expression analysis and common subexpressions elimination pass. The available expression analysis is done with consideration to effects which heavy inspired by multidimensional fencing.

How to verify it

Created tests

Commit message

feat[venom]: common subexpression elimination

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

class _Expression:
first_inst : IRInstruction
opcode: str
operands : list[IROperand]
Copy link
Member

Choose a reason for hiding this comment

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

looks like this can be IROperand | _Expression

HodanPlodky and others added 2 commits September 16, 2024 18:56
Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
…ar fix

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 83.62573% with 28 lines in your changes missing coverage. Please review.

Project coverage is 88.50%. Comparing base (9a208a6) to head (49e6949).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
vyper/venom/analysis/available_expression.py 82.05% 14 Missing and 7 partials ⚠️
...r/venom/passes/common_subexpression_elimination.py 86.27% 3 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4241      +/-   ##
==========================================
- Coverage   91.35%   88.50%   -2.85%     
==========================================
  Files         109      111       +2     
  Lines       15637    15812     +175     
  Branches     3443     3482      +39     
==========================================
- Hits        14285    13995     -290     
- Misses        920     1288     +368     
- Partials      432      529      +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants