ART: Fix crash in gtests

SsaLivenessAnalysis was crashing after change of iteration order in
142377 because gtests do not always build reverse post order.

Change-Id: If5ad5b7c52040b119c4415f0b942988049fa3c16
diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc
index 868fc5b..40f0adc 100644
--- a/compiler/optimizing/codegen_test.cc
+++ b/compiler/optimizing/codegen_test.cc
@@ -145,6 +145,7 @@
                              std::function<void(HGraph*)> hook_before_codegen,
                              bool has_result,
                              Expected expected) {
+  graph->BuildDominatorTree();
   SsaLivenessAnalysis liveness(*graph, codegen);
   liveness.Analyze();