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

insert phi nodes #54

Closed dcbaker closed 2 years ago

dcbaker commented 3 years ago

Once we have value numbering we just need phi nodes, that will allow us to correctly and simply handle situations where values are assigned in if statements or in loops.

There are few things to consider here:

  1. a phi is itself a value, so we will need to run numbering again
  2. we may need to insert blocks in between existing blocks for the phis to be correct, such as in nested branches