Merge "Use ScopedArenaVector instead of std::vector in SSA transformation."
diff --git a/compiler/dex/mir_optimization_test.cc b/compiler/dex/mir_optimization_test.cc
index 69c394f..29c353a 100644
--- a/compiler/dex/mir_optimization_test.cc
+++ b/compiler/dex/mir_optimization_test.cc
@@ -188,7 +188,9 @@
   }
 
   void PerformClassInitCheckElimination() {
+    cu_.mir_graph->SSATransformationStart();
     cu_.mir_graph->ComputeDFSOrders();
+    cu_.mir_graph->SSATransformationEnd();
     bool gate_result = cu_.mir_graph->EliminateClassInitChecksGate();
     ASSERT_TRUE(gate_result);
     RepeatingPreOrderDfsIterator iterator(cu_.mir_graph.get());
diff --git a/compiler/dex/ssa_transformation.cc b/compiler/dex/ssa_transformation.cc
index bd6bc22..4324325 100644
--- a/compiler/dex/ssa_transformation.cc
+++ b/compiler/dex/ssa_transformation.cc
@@ -16,6 +16,7 @@
 
 #include "compiler_internals.h"
 #include "dataflow_iterator-inl.h"
+#include "utils/scoped_arena_containers.h"
 
 #define NOTVISITED (-1)
 
@@ -69,7 +70,8 @@
 }
 
 void MIRGraph::RecordDFSOrders(BasicBlock* block) {
-  std::vector<BasicBlock*> succ;
+  DCHECK(temp_scoped_alloc_.get() != nullptr);
+  ScopedArenaVector<BasicBlock*> succ(temp_scoped_alloc_->Adapter());
   MarkPreOrder(block);
   succ.push_back(block);
   while (!succ.empty()) {
@@ -176,7 +178,9 @@
     dom_post_order_traversal_->Reset();
   }
   ClearAllVisitedFlags();
-  std::vector<std::pair<BasicBlock*, ArenaBitVector::IndexIterator>> work_stack;
+  DCHECK(temp_scoped_alloc_.get() != nullptr);
+  ScopedArenaVector<std::pair<BasicBlock*, ArenaBitVector::IndexIterator>> work_stack(
+      temp_scoped_alloc_->Adapter());
   bb->visited = true;
   work_stack.push_back(std::make_pair(bb, bb->i_dominated->Indexes().begin()));
   while (!work_stack.empty()) {