fix[venom]: fix sccp resolution of truthy jnz#4505
Merged
charles-cooper merged 9 commits intovyperlang:masterfrom Mar 11, 2025
Merged
fix[venom]: fix sccp resolution of truthy jnz#4505charles-cooper merged 9 commits intovyperlang:masterfrom
jnz#4505charles-cooper merged 9 commits intovyperlang:masterfrom
Conversation
this commit fixes SCCP traversal - when a jnz has a truthy condition that is not equal to 1, it gets transformed to a `jmp`, however, during lattice construction, both branches are explored and therefore some phis are suboptimally resolved to BOTTOM, even though they can theoretically be resolved to a proper value since one of the input bbs will actually be pruned from the CFG. this issue is *not* visible in the regular pipeline, since SCCP is run multiple times and thus the phis get resolved after the second SCCP run. however, it is visible in tests, and would be visible in the regular pipeline if SCCP were only run one time. this commit also removes a `FlowWorkItem` addition, which is redundant since all the cfg altering instructions are already handled in `_visit_expr`.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4505 +/- ##
=======================================
Coverage 92.16% 92.16%
=======================================
Files 122 122
Lines 17475 17471 -4
Branches 2962 2959 -3
=======================================
- Hits 16105 16103 -2
+ Misses 958 957 -1
+ Partials 412 411 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
HodanPlodky
approved these changes
Mar 10, 2025
harkal
approved these changes
Mar 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
see commit message
How I did it
How to verify it
see the unit tests
Commit message
Description for the changelog
Cute Animal Picture