Revert "Revert "Revert "Use the object class as top in reference type propagation"""

This reverts commit 80caa1478cf3df4eac1214d8a63a4da6f4fe622b.

Change-Id: I63b51ca418b19b2bfb5ede3f8444f8fbeb8a339d
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 296c1b0..519fa00 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1757,39 +1757,11 @@
   }
 }
 
-void HInstruction::SetReferenceTypeInfo(ReferenceTypeInfo rti) {
-  if (kIsDebugBuild) {
-    DCHECK_EQ(GetType(), Primitive::kPrimNot);
-    ScopedObjectAccess soa(Thread::Current());
-    DCHECK(rti.IsValid()) << "Invalid RTI for " << DebugName();
-    if (IsBoundType()) {
-      // Having the test here spares us from making the method virtual just for
-      // the sake of a DCHECK.
-      ReferenceTypeInfo upper_bound_rti = AsBoundType()->GetUpperBound();
-      DCHECK(upper_bound_rti.IsSupertypeOf(rti))
-          << " upper_bound_rti: " << upper_bound_rti
-          << " rti: " << rti;
-      DCHECK(!upper_bound_rti.GetTypeHandle()->IsFinal() || rti.IsExact());
-    }
-  }
-  reference_type_info_ = rti;
-}
-
-ReferenceTypeInfo::ReferenceTypeInfo() : type_handle_(TypeHandle()), is_exact_(false) {}
-
-ReferenceTypeInfo::ReferenceTypeInfo(TypeHandle type_handle, bool is_exact)
-    : type_handle_(type_handle), is_exact_(is_exact) {
-  if (kIsDebugBuild) {
-    ScopedObjectAccess soa(Thread::Current());
-    DCHECK(IsValidHandle(type_handle));
-  }
-}
-
 std::ostream& operator<<(std::ostream& os, const ReferenceTypeInfo& rhs) {
   ScopedObjectAccess soa(Thread::Current());
   os << "["
-     << " is_valid=" << rhs.IsValid()
-     << " type=" << (!rhs.IsValid() ? "?" : PrettyClass(rhs.GetTypeHandle().Get()))
+     << " is_top=" << rhs.IsTop()
+     << " type=" << (rhs.IsTop() ? "?" : PrettyClass(rhs.GetTypeHandle().Get()))
      << " is_exact=" << rhs.IsExact()
      << " ]";
   return os;