added dominator based spatial check elimination as a function pass