diff options
| author | 2015-04-24 15:20:27 +0000 | |
|---|---|---|
| committer | 2015-04-24 15:20:28 +0000 | |
| commit | f16d7b3824b2777b95fb509c1d2a95bef89f65a4 (patch) | |
| tree | c9a0aaf0fa17cabdb5bea88bc80a11b3d8bf499b /compiler/optimizing/boolean_simplifier.cc | |
| parent | 9f3565a632d12c9cadd7d966da308fd26dbc899c (diff) | |
| parent | 2d7352ba5311b8f57427b91b7a891e61497373c1 (diff) | |
Merge "ART: Dead block removal"
Diffstat (limited to 'compiler/optimizing/boolean_simplifier.cc')
| -rw-r--r-- | compiler/optimizing/boolean_simplifier.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc index 6ebfb45074..30c89f2d15 100644 --- a/compiler/optimizing/boolean_simplifier.cc +++ b/compiler/optimizing/boolean_simplifier.cc @@ -120,8 +120,11 @@ void HBooleanSimplifier::Run() { phi->ReplaceWith(replacement); merge_block->RemovePhi(phi); - // Link the start/end blocks and remove empty branches. - graph_->MergeEmptyBranches(block, merge_block); + // Delete the true branch and merge the resulting chain of blocks + // 'block->false_block->merge_block' into one. + true_block->DisconnectAndDelete(); + block->MergeWith(false_block); + block->MergeWith(merge_block); // Remove the original condition if it is now unused. if (!if_condition->HasUses()) { |