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]: make cfg scheduler "stack aware" #4356

Merged

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Nov 10, 2024

What I did

How I did it

How to verify it

Commit message

this is a step towards making the cfg traversal order more "stack
aware". previously we would blindly try to remove `iszero` instructions
before a `jnz`. now, the heuristic is based on which basic block
has a smaller sized dependency on this basic block. only if the two
cfg_out blocks have the same sized dependency, then we try to remove
the iszero.

this creates a slight improvement to codesize due to fewer stack
operations at `jnz` boundaries.

Description for the changelog

Cute Animal Picture

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

this is a step towards making the cfg traversal order more "stack
aware". previously we would blindly try to remove `iszero` instructions
before a `jnz`. now, the heuristic is based on which basic block has a
smaller sized dependency on this basic block. only if the two cfg_out
blocks have the same sized dependency, then we try to remove the iszero.
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 11.11111% with 16 lines in your changes missing coverage. Please review.

Project coverage is 45.99%. Comparing base (471a556) to head (22fd559).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
vyper/venom/passes/branch_optimization.py 11.11% 16 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (471a556) and HEAD (22fd559). Click for more details.

HEAD has 138 uploads less than BASE
Flag BASE (471a556) HEAD (22fd559)
139 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4356       +/-   ##
===========================================
- Coverage   91.37%   45.99%   -45.39%     
===========================================
  Files         112      112               
  Lines       15927    15940       +13     
  Branches     2693     2694        +1     
===========================================
- Hits        14554     7331     -7223     
- Misses        939     8050     +7111     
- Partials      434      559      +125     

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

@charles-cooper charles-cooper marked this pull request as ready for review November 12, 2024 05:56
@charles-cooper charles-cooper enabled auto-merge (squash) November 12, 2024 06:25
@charles-cooper charles-cooper merged commit fee16e6 into vyperlang:master Nov 12, 2024
157 checks passed
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