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

Shared: Use edge dominance terminology in basic block library #18696

Merged
merged 6 commits into from
Feb 11, 2025

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented Feb 6, 2025

Follow up to #18497.

This PR changes the shared basic block library to use the term "edge dominance" instead of "control". A key benefit of doing this is that "edge dominance" should be intuitive to those familiar with the standard notion of dominance in control flow graphs.

  • The immediatelyControls/3 is now dominatingEdge/2. I've dropped an argument since the last two contain the same amount of information. I wasn't quite sure whether to drop the basic block or the successor type, but ended up keeping the later for consistency with Java. It's also no longer a member predicate since it's not related to any of it's two arguments more than the other.
  • controls is now edgeDominates, but is otherwise unchanged.
  • For the existing downstream ConditionBlock classes I've added deprecations. These libraries are not re-exporting dominatingEdge because 1/ The existing immediatelyControls seems unused (I'm guessing it's key job is as a building block for control/edgeDominates and 2/ edgeDominates can subsume it.

Todo

  • Write change note (I'll do that once we agree on the changes).

@github-actions github-actions bot added C# Ruby Rust Pull requests that update Rust code Swift labels Feb 6, 2025
@paldepind paldepind force-pushed the shared-bb-dominates branch from 56cac75 to 820d2cb Compare February 6, 2025 09:38
@paldepind paldepind marked this pull request as ready for review February 6, 2025 14:31
@Copilot Copilot bot review requested due to automatic review settings February 6, 2025 14:31
@paldepind paldepind requested review from a team as code owners February 6, 2025 14:31

Choose a reason for hiding this comment

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

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

hvitved
hvitved previously approved these changes Feb 7, 2025
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

LGTM

@hvitved
Copy link
Contributor

hvitved commented Feb 7, 2025

I have started DCA runs.

hvitved
hvitved previously approved these changes Feb 11, 2025
Comment on lines 180 to 181
* can only be reached through `bb` and dominated by an _edge_ `s` if it can
* only be reached through `s`.
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Comment on lines 180 to 181
* it can only be reached through `bb` and dominated by an _edge_ `s` if it
* can only be reached through `s`.
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Co-authored-by: Anders Schack-Mulligen <[email protected]>
@paldepind
Copy link
Contributor Author

Thanks for the reviews. Comments should be addressed now.

Copy link
Contributor

@aschackmull aschackmull left a comment

Choose a reason for hiding this comment

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

LGTM

@paldepind paldepind merged commit c7412cc into github:main Feb 11, 2025
54 checks passed
@paldepind paldepind deleted the shared-bb-dominates branch February 11, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# documentation Ruby Rust Pull requests that update Rust code Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants