+++ title = "Maximal and minimal phi" author = "Yann Herklotz" tags = [] categories = [] backlinks = ["3a8a"] forwardlinks = ["3a8c"] zettelid = "3a8b" +++ There are several ways in which one can generate correct SSA programs with phi functions. One can either just generate them with phi nodes at each entrance to a block, or generate them only when they are necessary. In the former case, the number of phi functions means that many optimisations are hindered and will not work optimally. To generate phi functions only when they are necessary, we only need to generate them where the join point can be reached by two different control flows with distinct definition points of the variable.