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]: "pickaxe" stack scheduler optimization #3951

Merged
merged 5 commits into from
May 20, 2024

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Apr 14, 2024

What I did

fix for #3950

How I did it

How to verify it

Commit message

implement "pickaxe" stack scheduler optimization.

sometimes, venom produces some unneeded stack traffic. this can't be
fixed by improved dataflow analysis, because it is an issue in the stack
scheduler rather than instruction reordering. what happens is a stack
item is produced, but it has a longer lifespan than other things on the
stack and the instruction cannot be reordered. this commit introduces a
simple heuristic: at the time of stack item production, check the live
list for something with "shorter" liveness we can swap it with.

i just made up the "pickaxe" term but i think it sounds cool :)

Description for the changelog

Cute Animal Picture

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

implement "pickaxe" optimization
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.95%. Comparing base (ac19367) to head (169506a).
Report is 1 commits behind head on master.

Current head 169506a differs from pull request most recent head 9b54c4e

Please upload reports for the commit 9b54c4e to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3951      +/-   ##
==========================================
- Coverage   91.02%   87.95%   -3.07%     
==========================================
  Files         106      106              
  Lines       15306    15309       +3     
  Branches     3370     3365       -5     
==========================================
- Hits        13932    13465     -467     
- Misses        935     1307     +372     
- Partials      439      537      +98     

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

@charles-cooper charles-cooper marked this pull request as draft April 14, 2024 21:29
@charles-cooper charles-cooper marked this pull request as ready for review May 20, 2024 17:36
@charles-cooper
Copy link
Member Author

this improves codesize between 0.5%-1% on some test contracts i have

@charles-cooper charles-cooper changed the title feat[venom]: optimize stack scheduler feat[venom]: "pickaxe" stack scheduler optimization May 20, 2024
@charles-cooper charles-cooper changed the title feat[venom]: "pickaxe" stack scheduler optimization feat[venom]: "pickaxe" scheduler optimization May 20, 2024
@charles-cooper charles-cooper merged commit 0ba1c62 into vyperlang:master May 20, 2024
156 checks passed
@charles-cooper charles-cooper changed the title feat[venom]: "pickaxe" scheduler optimization feat[venom]: "pickaxe" stack scheduler optimization May 20, 2024
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.

None yet

3 participants