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]: binopt #4281

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

Conversation

HodanPlodky
Copy link
Contributor

What I did

Started reimplementing the binary operation optimization and some additional from original pipeline to venom pipeline

How I did it

The optimization are done in the AlgebraicOptimizationPass since the types of optimizations nicely slots into the purpose of the pass. Most of the logic is directly taken from the original pipeline

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

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

@HodanPlodky HodanPlodky changed the title Feat/binopt feat[venom]: binopt Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 12.70718% with 158 lines in your changes missing coverage. Please review.

Project coverage is 45.70%. Comparing base (fdc05d6) to head (63fdfd5).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
vyper/venom/passes/algebraic_optimization.py 12.42% 155 Missing ⚠️
vyper/venom/analysis/dfg.py 33.33% 2 Missing ⚠️
vyper/venom/__init__.py 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (fdc05d6) and HEAD (63fdfd5). Click for more details.

HEAD has 139 uploads less than BASE
Flag BASE (fdc05d6) HEAD (63fdfd5)
140 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4281       +/-   ##
===========================================
- Coverage   91.35%   45.70%   -45.66%     
===========================================
  Files         110      110               
  Lines       15789    16041      +252     
  Branches     2674     2729       +55     
===========================================
- Hits        14424     7331     -7093     
- Misses        931     8156     +7225     
- Partials      434      554      +120     

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

c = get_contract(bad_code)
with tx_failed():
c.do_slice()
except StaticAssertionException:

Check notice

Code scanning / CodeQL

Empty except Note test

'except' clause does nothing but pass and there is no explanatory comment.
vyper/venom/passes/algebraic_optimization.py Fixed Show fixed Hide fixed
Comment on lines +358 to +359
# if val == "div":
# return finalize("gt", ["iszero", args])

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
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.

1 participant