summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Anton Shamin <anton.shamin@intel.com> 2016-05-16 16:44:13 +0600
committer Anton Shamin <anton.shamin@intel.com> 2016-06-07 01:11:44 +0600
commitf89381fed12faf96c45a83a989ae2fff82c05f3b (patch)
treefafdf6e995bbea12c62220e9e8cda6a7d22fc139 /compiler/optimizing/nodes.h
parent2e1c66e37db7eaa713459e15b115d5c217d6e414 (diff)
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. Change-Id: I9f72c0f4c33b358341109238bea46cb5a82f490f Signed-off-by: Anton Shamin <anton.shamin@intel.com>
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index c08323a0c6..38472cf8e8 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -733,6 +733,8 @@ class HLoopInformation : public ArenaObject<kArenaAllocLoopInfo> {
return blocks_.GetHighestBitSet() != -1;
}
+ bool DominatesAllBackEdges(HBasicBlock* block);
+
private:
// Internal recursive implementation of `Populate`.
void PopulateRecursive(HBasicBlock* block);