Revert "Revert "ART: Update DCE to work with try/catch""
The previous CL failed because it did not update inputs of catch phis.
Since phi input indices cannot be easily mapped back to throwing
instructions, this new implementation at least removes catch phi uses
of values defined in the removed blocks to preserve graph consistency.
This reverts commit fb552d7061746f7a90fdd5002696e255e2e15c35.
Change-Id: I63d95915d1ef50e71d3bcf0cd10aaded554035b4
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 4e81248..17b7094 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -240,8 +240,9 @@
// put deoptimization instructions, etc.
void TransformLoopHeaderForBCE(HBasicBlock* header);
- // Removes `block` from the graph.
- void DeleteDeadBlock(HBasicBlock* block);
+ // Removes `block` from the graph. Assumes `block` has been disconnected from
+ // other blocks and has no instructions or phis.
+ void DeleteDeadEmptyBlock(HBasicBlock* block);
// Splits the edge between `block` and `successor` while preserving the
// indices in the predecessor/successor lists. If there are multiple edges