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

fix some unapplied optimizations #2944

Merged
merged 5 commits into from
Jul 25, 2022

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Jun 27, 2022

the changed optimizations were getting rolled back, because
_deep_contains does not work on deconstructed IRnodes

also fixes #2943

What I did

How I did it

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

image

the changed optimizations were getting rolled back, because
`_deep_contains` does not work on deconstructed IRnodes
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2022

Codecov Report

Merging #2944 (30071c6) into master (72bb12e) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2944      +/-   ##
==========================================
- Coverage   88.09%   87.99%   -0.11%     
==========================================
  Files          97       97              
  Lines       10852    10877      +25     
  Branches     2574     2574              
==========================================
+ Hits         9560     9571      +11     
- Misses        832      849      +17     
+ Partials      460      457       -3     
Impacted Files Coverage Δ
vyper/codegen/core.py 84.99% <100.00%> (+0.08%) ⬆️
vyper/ir/optimizer.py 97.86% <100.00%> (+2.83%) ⬆️
vyper/utils.py 84.68% <0.00%> (-5.32%) ⬇️
vyper/codegen/arithmetic.py 70.90% <0.00%> (-4.85%) ⬇️
vyper/builtin_functions/functions.py 89.99% <0.00%> (-0.26%) ⬇️
vyper/ast/expansion.py 93.93% <0.00%> (-0.18%) ⬇️
vyper/ast/folding.py 91.59% <0.00%> (-0.14%) ⬇️
vyper/ast/nodes.py 93.01% <0.00%> (+0.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

fixes an optimization regression because `unique_symbols` breaks the
merge_calldataload optimization

fixes a missed case in merge_calldataload and merge_memzero where the
optimization would not get applied if the mstores were the last items in
the `seq` block.
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jun 27, 2022

This pull request introduces 2 alerts when merging 79c668e into c27f225 - view on LGTM.com

new alerts:

  • 2 for Nested loops with same variable

@charles-cooper charles-cooper marked this pull request as ready for review July 24, 2022 17:27
@charles-cooper charles-cooper merged commit 4b3b636 into vyperlang:master Jul 25, 2022
@charles-cooper charles-cooper deleted the fix/optimizer branch July 25, 2022 15:24
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.

perf: merge calldataloads optimization not applied
3 participants