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
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index f87775e..c5fc563 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1281,6 +1281,9 @@
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_; }