Skip to content

Attempt at fixing copy propagation in LVN pass.#116

Open
cgyurgyik wants to merge 5 commits into
sampsyo:mainfrom
cgyurgyik:nonlocal
Open

Attempt at fixing copy propagation in LVN pass.#116
cgyurgyik wants to merge 5 commits into
sampsyo:mainfrom
cgyurgyik:nonlocal

Conversation

@cgyurgyik

Copy link
Copy Markdown
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

sampsyo commented Jan 6, 2021

Copy link
Copy Markdown
Owner

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
Copy Markdown
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