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

feat(ssa): Post dominator tree #7595

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

vezenovm
Copy link
Contributor

@vezenovm vezenovm commented Mar 5, 2025

Description

Problem*

Resolves #7571

Summary*

This PR is mostly contained to tests as it will be the basis for further control dependence analysis.

  1. Logic for reversing the CFG
  2. Switched post order computation to use the CFG rather than the function definition
  3. Add a test to show using the the reversed CFG and updated post order provides an accurate post-dominator tree

Additional Context

The new reverse and with_function_post_dom methods are only used in tests. The #[cfg(test)] attribute will be removed as these methods are used by later work.

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@vezenovm vezenovm requested a review from a team March 5, 2025 17:25
@vezenovm vezenovm marked this pull request as draft March 5, 2025 18:37
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.

Post-Dominator Tree
1 participant