Skip to content

(refactor): Updating analysis framework to be easier to use#9564

Merged
eytan-starkware merged 1 commit intomainfrom
eytan_graphite/_refactor_updating_analysis_framework_to_be_easier_to_use
Feb 3, 2026
Merged

(refactor): Updating analysis framework to be easier to use#9564
eytan-starkware merged 1 commit intomainfrom
eytan_graphite/_refactor_updating_analysis_framework_to_be_easier_to_use

Conversation

@eytan-starkware
Copy link
Contributor

@eytan-starkware eytan-starkware commented Jan 29, 2026

Summary

Added a block_entry_location method to the DataflowAnalyzer trait to determine the appropriate location for block entry based on analysis direction. This method handles both backward and forward analysis cases, recursively finding locations when needed. Also modified the merge method signature to take the lowered parameter instead of a separate location parameter, and updated the Edge enum to use owned rather than referenced values for certain fields. Added a location method to BlockEnd to extract location information when available.


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

Why is this change needed?

This change improves the dataflow analysis framework by providing a consistent way to determine block entry locations based on analysis direction. It simplifies the API by having the analyzer determine the appropriate location rather than requiring it to be passed separately, and makes ownership clearer by using owned values where appropriate.


What was the behavior or documentation before?

Previously, the merge method required a separate location parameter, and there was no standardized way to determine block entry locations based on analysis direction.


What is the behavior or documentation after?

Now the DataflowAnalyzer trait includes a block_entry_location method that handles both backward and forward analysis cases, recursively finding locations when needed. The merge method signature has been updated to take the lowered parameter instead of a separate location parameter.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

eytan-starkware commented Jan 29, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06f2a64601

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@orizi reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eytan-starkware and @TomerStarkware).

Copy link
Contributor Author

@eytan-starkware eytan-starkware left a comment

Choose a reason for hiding this comment

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

@eytan-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @TomerStarkware).

@eytan-starkware eytan-starkware force-pushed the eytan_graphite/_refactor_updating_analysis_framework_to_be_easier_to_use branch from 06f2a64 to 024ddbf Compare February 1, 2026 11:15
Copy link
Contributor Author

@eytan-starkware eytan-starkware left a comment

Choose a reason for hiding this comment

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

@eytan-starkware resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware).

@eytan-starkware eytan-starkware force-pushed the eytan_graphite/_refactor_updating_analysis_framework_to_be_easier_to_use branch from 024ddbf to 2ad86bb Compare February 1, 2026 12:48
@eytan-starkware eytan-starkware force-pushed the eytan_graphite/_refactor_updating_analysis_framework_to_be_easier_to_use branch from 2ad86bb to 32bfb79 Compare February 1, 2026 12:49
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@orizi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware).

@eytan-starkware eytan-starkware added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 5936955 Feb 3, 2026
55 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