diff options
| author | 2015-11-05 17:15:05 +0000 | |
|---|---|---|
| committer | 2015-11-05 17:15:05 +0000 | |
| commit | d93223d7966bee1ae91a9e224c1dd56de1aa3f50 (patch) | |
| tree | c26470258961ad9775c8f8ebec9ad102f08d1f55 /compiler/optimizing/bounds_check_elimination.cc | |
| parent | f2a93f4d824d6ea0f5858c774ba03f1c002a6aaa (diff) | |
| parent | 389b3dbf5c5390056ff4dacac464219853dd3cda (diff) | |
Merge "Finalized all components of range analysis needed for dynamic bce."
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.cc')
| -rw-r--r-- | compiler/optimizing/bounds_check_elimination.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc index bcc32403d3..cca0baf274 100644 --- a/compiler/optimizing/bounds_check_elimination.cc +++ b/compiler/optimizing/bounds_check_elimination.cc @@ -1169,8 +1169,10 @@ class BCEVisitor : public HGraphVisitor { // Return the range resulting from induction variable analysis of "instruction" when the value // is used from "context", for example, an index used from a bounds-check inside a loop body. ValueRange* LookupInductionRange(HInstruction* context, HInstruction* instruction) { - InductionVarRange::Value v1 = induction_range_.GetMinInduction(context, instruction); - InductionVarRange::Value v2 = induction_range_.GetMaxInduction(context, instruction); + InductionVarRange::Value v1; + InductionVarRange::Value v2; + bool needs_finite_test = false; + induction_range_.GetInductionRange(context, instruction, &v1, &v2, &needs_finite_test); if (v1.is_known && (v1.a_constant == 0 || v1.a_constant == 1) && v2.is_known && (v2.a_constant == 0 || v2.a_constant == 1)) { DCHECK(v1.a_constant == 1 || v1.instruction == nullptr); |