summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-06-17 10:17:49 +0100
committerMingyao Yang <mingyao@google.com>2015-06-19 13:31:11 -0700
commit31fa4b57132a2352630b599b4da7e69f77376dcb (patch)
tree55ab8e06188a6c6ed3358f03c4e6d0b8164e3956 /compiler/optimizing
parentbca381a12965a98e3727e93986dd0a195db500a0 (diff)
downloadart-31fa4b57132a2352630b599b4da7e69f77376dcb.tar.gz
art-31fa4b57132a2352630b599b4da7e69f77376dcb.tar.bz2
art-31fa4b57132a2352630b599b4da7e69f77376dcb.zip
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. Bug: 21034044 (cherry picked from commit 3cde6227678cf62e06bca264671d1e957456ac3d) Change-Id: I639f4ea6f5889726142041a42736183f162c7437
Diffstat (limited to 'compiler/optimizing')
-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 f8550c2b47..bd294f0871 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;
}