bril
bril copied to clipboard
Attempt at fixing copy propagation in LVN pass.
This is a first attempt at #77. It is far from elegant. This gist of the function is to:
- Look for an instruction with
idop. Ifarghas not been defined yet, assume it is defined outside of the local scope. - For every other instruction, if the
destname is equivalent to some variable defined outside the local scope, rename it. - Rename every use until its next assign as well.
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.
No problem!