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

refactor[venom]: refactor sccp pass to use dfg #4329

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

HodanPlodky
Copy link
Collaborator

@HodanPlodky HodanPlodky commented Oct 25, 2024

What I did

used DFGAnalysis in SCCP instead of the computing the uses in the SCCP itself

How I did it

Remove computation from the SCCP and added DFG analysis into it and changed the DFG analysis so it uses OrderedSet

How to verify it

Commit message

use `DFGAnalysis` in `SCCP` instead of duplicating the logic to compute
uses in the `SCCP` itself. also use `OrderedSet` for var uses, this
ensures we don't add the same instruction multiple times (as in `add
%2 %2`) to a var's use set, and also enables a cheaper `remove_use()`
implementation.

Cute Animal Picture

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

@charles-cooper charles-cooper changed the title Sccp dfg use refactor[venom]: refactor sccp pass to use dfg Oct 25, 2024
@@ -67,14 +67,16 @@ def __init__(self, analyses_cache: IRAnalysesCache, function: IRFunction):
def run_pass(self):
self.fn = self.function
self.dom = self.analyses_cache.request_analysis(DominatorTreeAnalysis)
Copy link
Member

Choose a reason for hiding this comment

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

i was looking at this and i think technically we don't even need dominator analysis, we just use it for dfs walk

@charles-cooper charles-cooper merged commit 658f0c4 into vyperlang:master Oct 25, 2024
156 of 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.

3 participants