Skip to content

chore: Remove redundant post-loop invalidation in DataFlowAnalyzer::operator()(Switch& - #16186

Open
sashass1315 wants to merge 1 commit into
argotorg:developfrom
sashass1315:feat/yul-dfa-switch-invalidation-cleanup
Open

chore: Remove redundant post-loop invalidation in DataFlowAnalyzer::operator()(Switch&#16186
sashass1315 wants to merge 1 commit into
argotorg:developfrom
sashass1315:feat/yul-dfa-switch-invalidation-cleanup

Conversation

@sashass1315

Copy link
Copy Markdown

Delete the extra clearKnowledgeIfInvalidated(_case.body) loop after processing all cases.
Per-case invalidation already applies the necessary clears, and joinKnowledge does not reintroduce knowledge, so the second pass is redundant.
Keeps behavior unchanged while reducing unnecessary work.

@cameel cameel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code does not even compile - have you properly verified your change? Note that CI is all red.

Also, while this would be a refactor, the correctness of DataFlowAnalyzer is pretty critical to Yul optimizer so we cannot take changes to it lightly. Please verify that in test/libyul/yulOptimizerTests/ the affected optimizer steps have adequate switch coverage. If not, we'll need extra tests before we can merge this.

@github-actions

Copy link
Copy Markdown

This pull request is stale because it has been open for 14 days with no activity.
It will be closed in 7 days unless the stale label is removed.

@github-actions github-actions Bot added the stale The issue/PR was marked as stale because it has been open for too long. label Sep 13, 2025
@cameel cameel added external contribution ⭐ and removed stale The issue/PR was marked as stale because it has been open for too long. labels Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants