



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




1 1 2 3 1 2 4 1 1 2 1 1 (^41 ) 2 2 3 1 2
j
a b c d e f g h a i
h
a b j c d e f g h i k l CFG1 – a spanning tree a b c d e f g h a i CFG2 – a spanning tree
Computing DF for CFG1: The following are the join nodes: c, d, g, f, k – These are the only nodes that can appear in a dominance frontier. First consider node c with predecessors b and e. Node b isn’t interesting since it is c’s immediate dominator. Starting at node e in the IDom tree and moving up until we encounter b, we pass through nodes e and c. Put c in the DF for both nodes. Consider node d with predecessors b and j. Node b isn’t interesting since it is d’s immediate dominator. Starting at node j in the IDom tree and moving up until we encounter b, we pass through nodes j, h, f and d. Put d in the DF for these nodes. Consider node g with predecessors e and i. Node e isn’t interesting since it is g’s immediate dominator. Starting at node i in the IDom tree and moving up until we encounter e, we pass through nodes i and g. Put g in the DF for these nodes. Consider node f with predecessors d and h. Node d isn’t interesting since it is g’s immediate dominator. Starting at node h in the IDom tree and moving up until we encounter d, we pass through nodes h and f. Put f in the DF for these nodes. Consider node k with predecessors g and d. Node k is immediately dominated by b. Starting at node g in the IDom tree and moving up until we encounter b, we pass through nodes g, e and c. Put k in the DF for these nodes. Starting at node d in the IDom tree and moving up until we encounter b, we pass through node d. Put k in the DF for d.
IDOM tree