dcbaker / meson-plus-plus

An experimental and incomplete implementation of Meson in C++, for solving Meson's bootstrapping issue.
Apache License 2.0
50 stars 7 forks source link

mir/passes/value_numbering: introduce #53

Closed dcbaker closed 3 years ago

dcbaker commented 3 years ago

This adds a value numbering pass. All it does is go through and annotations for which "version" of the variable this is. This doesn't re-value something that's already been valued. Taht might prove to be annoying, but I'm going to go with it for now.

If we do need to re-value, we probably need to write a "de-numbering" pass to run before the value_numbering pass, due to revisiting the same block twice.

Fixes #29