Dominator tree

Embed Size (px)

Citation preview

  • 1. D(5) = entry; D(1) = exit; D(4) = P(4)UD(4) = D(5)UD(4) = {5,4}; D(3) = P(3)UD(3) = D(5)UD(3) = {5,3}; D(2) = P(2)UD(2) = D(3)UD(2) = {5,3,2}; @ Pre(3) D(1) = P(1)UD(1) = D(5)UD(1) = {5,1}; D(2) = P(2)UD(3) = D(1)UD(2) = {5,,3,2}&{5,1}UD(2) @ Pre(1) = {5,2}

2. Post dominator tree pre order{3,4,5,2,1} post_order{1,4,5,2,3} Dominator tree pre order{5,1,2,3,4}post order {1,2,3,4,5} Feedback cut @ 1 5 1 3 2 4 5 1 3 3 2 4 2 3. A Simple, Fast Dominance Algorithm 4. 1 2 3 6 5 1 2 3 4 6 5 1 2 3 4 6 5 1 2 3 4 5.

  • Thus, the total cost per iteration is O(N + E D)
    • D is the size ofthe largest Dom set. 6. E is taken over the entire traversal 7. N is traversing the graph to compute the reverse postorder sequence