summaryrefslogtreecommitdiff
path: root/compiler/optimizing/bounds_check_elimination.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.cc')
-rw-r--r--compiler/optimizing/bounds_check_elimination.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc
index 8aefd9ea1f..994d394a2a 100644
--- a/compiler/optimizing/bounds_check_elimination.cc
+++ b/compiler/optimizing/bounds_check_elimination.cc
@@ -887,7 +887,7 @@ class BCEVisitor : public HGraphVisitor {
bool needs_finite_test = false;
bool needs_taken_test = false;
if (DynamicBCESeemsProfitable(loop, bounds_check->GetBlock()) &&
- induction_range_.CanGenerateCode(
+ induction_range_.CanGenerateRange(
bounds_check, index, &needs_finite_test, &needs_taken_test) &&
CanHandleInfiniteLoop(loop, index, needs_finite_test) &&
// Do this test last, since it may generate code.
@@ -1403,10 +1403,10 @@ class BCEVisitor : public HGraphVisitor {
// whether code generation on the original and, thus, related bounds check was possible.
// It handles either loop invariants (lower is not set) or unit strides.
if (other_c == max_c) {
- induction_range_.GenerateRangeCode(
+ induction_range_.GenerateRange(
other_bounds_check, other_index, GetGraph(), block, &max_lower, &max_upper);
} else if (other_c == min_c && base != nullptr) {
- induction_range_.GenerateRangeCode(
+ induction_range_.GenerateRange(
other_bounds_check, other_index, GetGraph(), block, &min_lower, &min_upper);
}
ReplaceInstruction(other_bounds_check, other_index);
@@ -1699,11 +1699,8 @@ class BCEVisitor : public HGraphVisitor {
// Insert the taken-test to see if the loop body is entered. If the
// loop isn't entered at all, it jumps around the deoptimization block.
if_block->AddInstruction(new (GetGraph()->GetArena()) HGoto()); // placeholder
- HInstruction* condition = nullptr;
- induction_range_.GenerateTakenTest(header->GetLastInstruction(),
- GetGraph(),
- if_block,
- &condition);
+ HInstruction* condition = induction_range_.GenerateTakenTest(
+ header->GetLastInstruction(), GetGraph(), if_block);
DCHECK(condition != nullptr);
if_block->RemoveInstruction(if_block->GetLastInstruction());
if_block->AddInstruction(new (GetGraph()->GetArena()) HIf(condition));