bril icon indicating copy to clipboard operation
bril copied to clipboard

Attempt at fixing copy propagation in LVN pass.

Open cgyurgyik opened this issue 4 years ago • 2 comments

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.

cgyurgyik avatar Jan 06 '21 02:01 cgyurgyik

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.

sampsyo avatar Jan 06 '21 13:01 sampsyo

No problem!

cgyurgyik avatar Jan 06 '21 13:01 cgyurgyik