Fixes and improvements in ReferenceTypePropagation

- Bound object types after a CheckCast. This increases the precision of
(inlining) generic operations.
- Make sure that the BoundType is exact when the class is final.
- Make sure that we don't duplicate BoundTypes when we run the analysis
more than once.

Change-Id: Ic22b610766fae101f942c0d753ddcac32ac1844a
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc
index 37c060c..aaf7a6d 100644
--- a/compiler/optimizing/graph_visualizer.cc
+++ b/compiler/optimizing/graph_visualizer.cc
@@ -397,6 +397,11 @@
     return strcmp(pass_name_, name) == 0;
   }
 
+  bool IsReferenceTypePropagationPass() {
+    return strstr(pass_name_, ReferenceTypePropagation::kReferenceTypePropagationPassName)
+        != nullptr;
+  }
+
   void PrintInstruction(HInstruction* instruction) {
     output_ << instruction->DebugName();
     if (instruction->InputCount() > 0) {
@@ -460,14 +465,13 @@
       } else {
         StartAttributeStream("loop") << "B" << info->GetHeader()->GetBlockId();
       }
-    } else if (IsPass(ReferenceTypePropagation::kReferenceTypePropagationPassName)
-               && is_after_pass_) {
+    } else if (IsReferenceTypePropagationPass() && is_after_pass_) {
       if (instruction->GetType() == Primitive::kPrimNot) {
         if (instruction->IsLoadClass()) {
           ReferenceTypeInfo info = instruction->AsLoadClass()->GetLoadedClassRTI();
           ScopedObjectAccess soa(Thread::Current());
           if (info.GetTypeHandle().GetReference() != nullptr) {
-            StartAttributeStream("klass") << PrettyClass(info.GetTypeHandle().Get());
+            StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get());
           } else {
             StartAttributeStream("klass") << "unresolved";
           }
@@ -477,7 +481,7 @@
             StartAttributeStream("klass") << "java.lang.Object";
           } else {
             ScopedObjectAccess soa(Thread::Current());
-            StartAttributeStream("klass") << PrettyClass(info.GetTypeHandle().Get());
+            StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get());
           }
           StartAttributeStream("exact") << std::boolalpha << info.IsExact() << std::noboolalpha;
         }