summaryrefslogtreecommitdiff
path: root/compiler/optimizing/boolean_simplifier.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-24 12:20:24 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-06-24 12:37:52 +0100
commit1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1 (patch)
tree50d71ef83f27827f0acfe6708acdb46e159f7506 /compiler/optimizing/boolean_simplifier.cc
parenta12f729e7165780e73857e6248af0df00ad6ce2b (diff)
Recompute dominator tree after DCE.
bug:22031382 Change-Id: Ifebe169897b76872015e3ce0ed7d0a9662f80cef
Diffstat (limited to 'compiler/optimizing/boolean_simplifier.cc')
-rw-r--r--compiler/optimizing/boolean_simplifier.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc
index 8100a29f32..daf7d67746 100644
--- a/compiler/optimizing/boolean_simplifier.cc
+++ b/compiler/optimizing/boolean_simplifier.cc
@@ -141,6 +141,12 @@ void HBooleanSimplifier::TryRemovingBooleanSelection(HBasicBlock* block) {
block->MergeWith(false_block);
block->MergeWith(merge_block);
+ // No need to update any dominance information, as we are simplifying
+ // a simple diamond shape, where the join block is merged with the
+ // entry block. Any following blocks would have had the join block
+ // as a dominator, and `MergeWith` handles changing that to the
+ // entry block.
+
// Remove the original condition if it is now unused.
if (!if_condition->HasUses()) {
if_condition->GetBlock()->RemoveInstructionOrPhi(if_condition);