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]: improve load elimination #4407

Merged

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Dec 18, 2024

What I did

follow up to #4265 but generalize the lattice to multiple keys

How I did it

How to verify it

Commit message

improve `LoadEliminationPass` by generalizing the algorithm to multiple
keys. for simplicity, keep the scope within a single basic block
still. generalize to "readonly" address spaces (`calldataload` and
`dload`) as well.

misc/refactor:
- add hevm harness to the load elimination tests.

Description for the changelog

Cute Animal Picture

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

@charles-cooper charles-cooper force-pushed the feat/advanced-load-elimination branch from f57aab3 to 0155857 Compare December 20, 2024 20:13
@charles-cooper charles-cooper changed the title Feat/advanced load elimination feat[venom]: improve load elimination Dec 20, 2024
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.12%. Comparing base (ae6ab0d) to head (55d4de0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4407      +/-   ##
==========================================
+ Coverage   92.09%   92.12%   +0.02%     
==========================================
  Files         119      119              
  Lines       16936    16967      +31     
  Branches     2866     2872       +6     
==========================================
+ Hits        15598    15631      +33     
+ Misses        919      918       -1     
+ Partials      419      418       -1     

☔ 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 February 10, 2025 13:00
Co-authored-by: HodanPlodky <36966616+HodanPlodky@users.noreply.github.com>
Copy link
Collaborator

@harkal harkal left a comment

Choose a reason for hiding this comment

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

lgtm in general. If in the mood, I would:

  1. change the self._lattice to be a local variable.
  2. split the handling of load/store parts of the instruction look to separate methods for cleaner look

@charles-cooper charles-cooper merged commit c75a2da into vyperlang:master Feb 12, 2025
164 checks passed
@charles-cooper charles-cooper deleted the feat/advanced-load-elimination branch February 12, 2025 13:36
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