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

[Pass] Refactor use-def chain analysis #276

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

chhzh123
Copy link
Member

Description

This PR refactors the use-def chain analysis to better figure out the equivalent variables in a program with deep nested functions.

  1. Remove the original use-def pass before type annotation to reduce the maintenance burden.
  2. Add a new analyze_use_def pass in passes.py, which leverages the union-find structure to get the equivalent tensors.

Checklist

  • PR's title starts with a category (e.g. [Bugfix], [IR], [Builder], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage (It would be better to provide ~2 different test cases to test the robustness of your code)
  • Code is well-documented

@chhzh123 chhzh123 merged commit 8015eeb into cornell-zhang:main Dec 13, 2024
1 check passed
@chhzh123 chhzh123 deleted the remove_use_def branch December 13, 2024 05:01
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.

1 participant