OSDN Git Service

ART: Remove a BasicBlock's fall_through pointer in Hide()
authorJean Christophe Beyler <jean.christophe.beyler@intel.com>
Wed, 18 Jun 2014 21:14:15 +0000 (14:14 -0700)
committerChao-ying Fu <chao-ying.fu@intel.com>
Wed, 20 Aug 2014 23:46:32 +0000 (16:46 -0700)
Remove the fall_through link that a BasicBlock has to its child when
calling its Hide function.  Useful for removing the visible link that is
there when we dump the CFG.

Change-Id: Ie82c48b195d1d62e2984d284dcc29ed7d7444db2
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
compiler/dex/mir_graph.cc

index dee1361..baaf006 100644 (file)
@@ -2068,6 +2068,11 @@ void BasicBlock::Hide(CompilationUnit* c_unit) {
     // Replace child with null child.
     childPtr->predecessors->Delete(id);
   }
+
+  // Remove link to children.
+  taken = NullBasicBlockId;
+  fall_through = NullBasicBlockId;
+  successor_block_list_type = kNotUsed;
 }
 
 bool BasicBlock::IsSSALiveOut(const CompilationUnit* c_unit, int ssa_reg) {