summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Guillaume Sanchez <guillaumesa@google.com> 2015-06-09 18:33:02 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-06-10 13:09:32 +0100
commit222862ceaeed48528020412ef4f7b1cdaecf8789 (patch)
treee5890d54817d80319580044d01f8bc3c65c43729 /compiler/optimizing/nodes.h
parent864a2d955aa85ab989c86d7f1eeacbe0b11f8b0f (diff)
Add optimizations for instanceof/checkcast.
The optimizations try to statically determine the outcome of the type tests, replacing/removing the instructions when possible. This required to fix the is_exact flag for ReferenceTypePropagation. Change-Id: I6cea29b6c351d118b62060e8420333085e9383fb
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index f87775e195..c5fc5637a0 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1281,6 +1281,9 @@ class ReferenceTypeInfo : ValueObject {
bool IsExact() const { return is_exact_; }
bool IsTop() const { return is_top_; }
+ bool IsInterface() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ return !IsTop() && GetTypeHandle()->IsInterface();
+ }
Handle<mirror::Class> GetTypeHandle() const { return type_handle_; }