OSDN Git Service

ART: ArrayGet hoisting restriction added.
authorAnton Shamin <anton.shamin@intel.com>
Mon, 16 May 2016 10:44:13 +0000 (16:44 +0600)
committerNarayan Kamath <narayan@google.com>
Tue, 7 Jun 2016 09:36:45 +0000 (10:36 +0100)
commitf479d7758dbe7e8740386fbf1d73e05b0277c5e3
tree6f7624034c1d7d24e82db7a8a9ae68a2504cd7a4
parent841f999d9d487f42ac38bc62ddd8cf1c93ec0503
ART: ArrayGet hoisting restriction added.

Currently if we hoist ArrayGet from loop there is no guarantee
that insn will be executed at runtime. Because of that we could
face issues like crashes in generated code.

This patch introduces restriction for ArrayGet hoisting. We say
that ArrayGet execution is guaranteed at least one time if its bb
dominates all exit blocks.

Signed-off-by: Anton Shamin <anton.shamin@intel.com>
(cherry picked from commit f89381fed12faf96c45a83a989ae2fff82c05f3b)

BUG=29145171

Change-Id: Ia5664dedb1543d78a7b4038801b8372572f069f6
compiler/optimizing/bounds_check_elimination.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
test/562-bce-preheader/src/Main.java