summaryrefslogtreecommitdiffstats
path: root/content/zettel/3a8b.md
blob: bbd07ecb2705afbff80d550f273eb983f7b8258e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+++
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.