summaryrefslogtreecommitdiff
path: root/compiler/optimizing/boolean_simplifier.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-10-01 20:57:57 +0100
committer Vladimir Marko <vmarko@google.com> 2015-10-08 11:10:18 +0100
commitec7802a102d49ab5c17495118d4fe0bcc7287beb (patch)
tree08649609604b9c96bc48ca071c48b0af5abb1a3f /compiler/optimizing/boolean_simplifier.cc
parentb2e436ffcda1d7a87e7bf9133d8ed878388c73c2 (diff)
Add DCHECKs to ArenaVector and ScopedArenaVector.
Implement dchecked_vector<> template that DCHECK()s element access and insert()/emplace()/erase() positions. Change the ArenaVector<> and ScopedArenaVector<> aliases to use the new template instead of std::vector<>. Remove DCHECK()s that have now become unnecessary from the Optimizing compiler. Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
Diffstat (limited to 'compiler/optimizing/boolean_simplifier.cc')
-rw-r--r--compiler/optimizing/boolean_simplifier.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/boolean_simplifier.cc b/compiler/optimizing/boolean_simplifier.cc
index b0e83b0058..5b346872b0 100644
--- a/compiler/optimizing/boolean_simplifier.cc
+++ b/compiler/optimizing/boolean_simplifier.cc
@@ -42,8 +42,8 @@ void HBooleanSimplifier::TryRemovingNegatedCondition(HBasicBlock* block) {
// successor and the successor can only be reached from them.
static bool BlocksDoMergeTogether(HBasicBlock* block1, HBasicBlock* block2) {
if (!block1->IsSingleGoto() || !block2->IsSingleGoto()) return false;
- HBasicBlock* succ1 = block1->GetSuccessor(0);
- HBasicBlock* succ2 = block2->GetSuccessor(0);
+ HBasicBlock* succ1 = block1->GetSuccessors()[0];
+ HBasicBlock* succ2 = block2->GetSuccessors()[0];
return succ1 == succ2 && succ1->GetPredecessors().size() == 2u;
}
@@ -108,7 +108,7 @@ void HBooleanSimplifier::TryRemovingBooleanSelection(HBasicBlock* block) {
if (!BlocksDoMergeTogether(true_block, false_block)) {
return;
}
- HBasicBlock* merge_block = true_block->GetSuccessor(0);
+ HBasicBlock* merge_block = true_block->GetSuccessors()[0];
if (!merge_block->HasSinglePhi()) {
return;
}