implement dominator tree for control flow