OSDN Git Service

Update maximum number of reachable blocks in last step
authorJohnny Qiu <joqiu@nvidia.com>
Wed, 4 Jun 2014 07:23:49 +0000 (07:23 +0000)
committerJohnny Qiu <joqiu@nvidia.com>
Thu, 5 Jun 2014 11:00:56 +0000 (11:00 +0000)
Change-Id: I58e20d74fafdffd86ab3b7e4a1523b93abaae9a5
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
compiler/dex/mir_graph.cc

index 3ef1dbf..d6cd238 100644 (file)
@@ -1418,9 +1418,6 @@ void MIRGraph::SSATransformationStart() {
   temp_bit_vector_size_ = cu_->num_dalvik_registers;
   temp_bit_vector_ = new (temp_scoped_alloc_.get()) ArenaBitVector(
       temp_scoped_alloc_.get(), temp_bit_vector_size_, false, kBitMapRegisterV);
-
-  // Update the maximum number of reachable blocks.
-  max_num_reachable_blocks_ = num_reachable_blocks_;
 }
 
 void MIRGraph::SSATransformationEnd() {
@@ -1433,6 +1430,9 @@ void MIRGraph::SSATransformationEnd() {
   temp_bit_vector_ = nullptr;
   DCHECK(temp_scoped_alloc_.get() != nullptr);
   temp_scoped_alloc_.reset();
+
+  // Update the maximum number of reachable blocks.
+  max_num_reachable_blocks_ = num_reachable_blocks_;
 }
 
 void MIRGraph::ComputeTopologicalSortOrder() {