diff options
author | Vladimir Marko <vmarko@google.com> | 2014-12-08 15:16:54 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-12-08 15:37:05 +0000 |
commit | cb873d8fd06b7dde4b69c5987b4eaf541d345a50 (patch) | |
tree | 3e1614c8e57dfd262817512233319dd9ad526754 /compiler/dex/mir_graph.h | |
parent | 1495a8e6409238bca28a33fd47913e382a85ea79 (diff) | |
download | android_art-cb873d8fd06b7dde4b69c5987b4eaf541d345a50.tar.gz android_art-cb873d8fd06b7dde4b69c5987b4eaf541d345a50.tar.bz2 android_art-cb873d8fd06b7dde4b69c5987b4eaf541d345a50.zip |
Quick: Kill unreachable blocks instead of just hiding them.
This changes the block type from kDalvikByteCode to kDead
and properly cleans up predecessors and MIRGraph::catches_.
Bug: 18626174
Change-Id: I268bf68f7947604bcb82caf95ee79c6831ee6e2a
Diffstat (limited to 'compiler/dex/mir_graph.h')
-rw-r--r-- | compiler/dex/mir_graph.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h index 1a1884131a..263f47c9fb 100644 --- a/compiler/dex/mir_graph.h +++ b/compiler/dex/mir_graph.h @@ -410,15 +410,15 @@ class BasicBlock : public DeletableArenaObject<kArenaAllocBB> { void ResetOptimizationFlags(uint16_t reset_flags); /** - * @brief Hide the BasicBlock. - * @details Set it to kDalvikByteCode, set hidden to true, remove all MIRs, - * remove itself from any predecessor edges, remove itself from any - * child's predecessor array. + * @brief Kill the BasicBlock. + * @details Unlink predecessors to make this block unreachable, then KillUnreachable(). */ - void Hide(MIRGraph* mir_graph); + void Kill(MIRGraph* mir_graph); /** - * @brief Kill the unreachable block and all blocks that become unreachable by killing this one. + * @brief Kill the unreachable block and all blocks that become unreachable by killing this one. + * @details Set the block type to kDead and set hidden to true, remove all MIRs, + * unlink all successors and recursively kill successors that become unreachable. */ void KillUnreachable(MIRGraph* mir_graph); |