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

Attempt at fixing copy propagation in LVN pass. #116

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cgyurgyik
Copy link
Contributor

This is a first attempt at #77. It is far from elegant.
This gist of the function is to:

  1. Look for an instruction with id op. If arg has not been defined yet, assume it is defined outside of the local scope.
  2. For every other instruction, if the dest name is equivalent to some variable defined outside the local scope, rename it.
  3. Rename every use until its next assign as well.

@sampsyo
Copy link
Owner

sampsyo commented Jan 6, 2021

Cool. As a warning, giving this its full consideration will require some deep thinking that I may not be able to get to for a while. So please don't fret if I don't get around to merging this soon.

@cgyurgyik
Copy link
Contributor Author

No problem!

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.

2 participants