- A set of nodes
- Unecessary to insert in all nodes
-
DF_local(w)
are the successors which you don't dominateDF_up(w)
idom(w) does not dominate one of the nodes in the DF - Definition in start node
- A critical edge is an arc whose tail vertex has multiple successors and whose head vertex has multiple predecessor. When translating from SSA form we need a safe place to place copy statements. Phi functions are replaced by inserting copy statements in the predecessor vertices. Thus we cannot have critical edges.
- Copy statements are replaced by moves
- Appel & George
- If they are live at the same time
- They get the same color
- Instead of spilling a node directly it is pushed to the stack as if it had fewer than K (number of colors) neighbors. When it is popped, it is checked if the node has less than K colored neighbors.
Terminology
Insertion of PHI functions
PHI function for x is inserted in union of DF(v)
where v
is a vertex where
x is assigned.
Using the iterative approach, if we have assignments in node 0, 2 and 7 we would take the union of their dominator frontiers (in this case) 3, 4, and 6 resulting in:
DF1(A) = { 3, 4, 6 }
A = { 0, 2, 7 }
For each of these we will take the union of their respective DF. I.e.
DF2(A + DF1(A)) = DF(0) + DF(2) + DF(7) + DF(DF1(A))
Then iterate untill the set is unchanged.