diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 12:20:24 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 16:33:23 +0100 |
commit | 18b236e5261d2b1f312e632a4d3bb2273c8bf641 (patch) | |
tree | 1f4b070a76ec80935a470a1245dd37c35b71ece2 /compiler/optimizing/boolean_simplifier.cc | |
parent | 574cce14025e153d87ec051926d331c5a39e5f92 (diff) | |
download | art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.zip art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.tar.gz art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.tar.bz2 |
Recompute dominator tree after DCE.
bug:22031382
(cherry picked from commit 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1)
Change-Id: I9a74edb185cb806045903dfe9695d9cc1a02e86b
Diffstat (limited to 'compiler/optimizing/boolean_simplifier.cc')
-rw-r--r-- | compiler/optimizing/boolean_simplifier.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc index 8100a29..daf7d67 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); |