summaryrefslogtreecommitdiff
path: root/compiler/optimizing/bounds_check_elimination.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-17 10:17:49 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-06-17 10:21:13 +0100
commit3cde6227678cf62e06bca264671d1e957456ac3d (patch)
tree3ed515ca629a83c926980e42de1240e412c6d832 /compiler/optimizing/bounds_check_elimination.cc
parent088bd0d28acb70302d20f6e19a9db7f0536c09ee (diff)
Remove bogus DCHECK in BCE.
When creating a phi for the array length when we add HDeoptimization nodes, we might update accesses in inner loops to use that phi instead of the array length. The BCE phase was not expecting this case. Change-Id: I639f4ea6f5889726142041a42736183f162c7437
Diffstat (limited to 'compiler/optimizing/bounds_check_elimination.cc')
-rw-r--r--compiler/optimizing/bounds_check_elimination.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc
index 9d5e3fdca1..97b3725da1 100644
--- a/compiler/optimizing/bounds_check_elimination.cc
+++ b/compiler/optimizing/bounds_check_elimination.cc
@@ -335,12 +335,12 @@ class ArrayAccessInsideLoopFinder : public ValueObject {
continue;
}
- DCHECK(!length_value->IsPhi());
if (length_value->IsPhi()) {
- // Outer loop shouldn't collect bounds checks inside inner
- // loop because the inner loop body doen't dominate
- // outer loop's back edges. However just to be on the safe side,
- // if there are any such cases, we just skip over them.
+ // When adding deoptimizations in outer loops, we might create
+ // a phi for the array length, and update all uses of the
+ // length in the loop to that phi. Therefore, inner loops having
+ // bounds checks on the same array will use that phi.
+ // TODO: handle these cases.
continue;
}