Skip to content

fix[venom]: fix store elimination pass#4428

Merged
charles-cooper merged 3 commits intovyperlang:masterfrom
charles-cooper:fix/store-elimination-dfg
Dec 28, 2024
Merged

fix[venom]: fix store elimination pass#4428
charles-cooper merged 3 commits intovyperlang:masterfrom
charles-cooper:fix/store-elimination-dfg

Conversation

@charles-cooper
Copy link
Copy Markdown
Member

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

What I did

How I did it

How to verify it

Commit message

this commit fixes the store elimination pass by updating the dfg
in-place instead of relying on a stale dfg.

this currently results in no bytecode changes. previously this
was undetected because the order of items in the dfg happens to be
"well-behaved", but if the dfg is built using a traversal of basic
blocks in a different order (as may happen in upcoming passes), it can
result in store instructions failing to be eliminated.

note that we haven't rebuilt the dfg properly because `dfg.outputs`
is invalid after this pass. we could modify `dfg.outputs` in place, but
that results in a bytecode regression.

this commit also removes the dependency on CFGAnalysis as it is not
actually needed by the pass.

Description for the changelog

Cute Animal Picture

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

harkal and others added 2 commits December 28, 2024 16:13
@charles-cooper charles-cooper changed the title Fix/store elimination dfg fix[venom]: fix store elimination pass Dec 28, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) December 28, 2024 21:36
@charles-cooper charles-cooper merged commit 614ea0d into vyperlang:master Dec 28, 2024
@charles-cooper charles-cooper deleted the fix/store-elimination-dfg branch December 30, 2024 01:29
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.

2 participants