diff options
author | Calin Juravle <calin@google.com> | 2015-07-22 11:20:01 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-22 11:20:01 +0000 |
commit | a3073e24e00274d2957771518be5ecfa74591744 (patch) | |
tree | 0b07b7c0b70bb9e3c89b9b7c1ea58b59079be9c3 /compiler/optimizing/graph_visualizer.cc | |
parent | 236d0a3c35a369da99bb1f0c617a29f23b2f4df8 (diff) | |
parent | b0d5fc0ac139da4aaa1440263416b9bde05630b0 (diff) |
Merge "Fixes and improvements in ReferenceTypePropagation"
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index afea40316c..694b68ce94 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -396,6 +396,11 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { 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) { @@ -459,14 +464,13 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } 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"; } @@ -476,7 +480,7 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { 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; } |