diff options
| author | 2015-12-16 08:45:07 +0000 | |
|---|---|---|
| committer | 2015-12-16 08:45:07 +0000 | |
| commit | 13cd5cad6e51f52d7e2ef38c9415d6d03fd994e3 (patch) | |
| tree | 6f87852b9d14e479ea2c7ef92de35c3118a0fd1e /compiler/optimizing/graph_visualizer.cc | |
| parent | 6e4753f0bc55655e2e178cb16d6a232ebd055543 (diff) | |
| parent | b059c8a044ed3ede1a0eea4b1e92008ced90c013 (diff) | |
Merge "Revert "ART: Refactor SsaBuilder for more precise typing info""
am: b059c8a044
* commit 'b059c8a044ed3ede1a0eea4b1e92008ced90c013':
  Revert "ART: Refactor SsaBuilder for more precise typing info"
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
| -rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 19 | 
1 files changed, 12 insertions, 7 deletions
| diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 5f1328f545..e9fdb84d1e 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -30,7 +30,6 @@  #include "optimization.h"  #include "reference_type_propagation.h"  #include "register_allocator.h" -#include "ssa_builder.h"  #include "ssa_liveness_analysis.h"  #include "utils/assembler.h" @@ -506,7 +505,7 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor {        } else {          StartAttributeStream("loop") << "B" << info->GetHeader()->GetBlockId();        } -    } else if ((IsPass(SsaBuilder::kSsaBuilderPassName) +    } else if ((IsPass(ReferenceTypePropagation::kReferenceTypePropagationPassName)          || IsPass(HInliner::kInlinerPassName))          && (instruction->GetType() == Primitive::kPrimNot)) {        ReferenceTypeInfo info = instruction->IsLoadClass() @@ -520,15 +519,21 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor {          StartAttributeStream("exact") << std::boolalpha << info.IsExact() << std::noboolalpha;        } else if (instruction->IsLoadClass()) {          StartAttributeStream("klass") << "unresolved"; -      } else { +      } else if (instruction->IsNullConstant()) {          // The NullConstant may be added to the graph during other passes that happen between          // ReferenceTypePropagation and Inliner (e.g. InstructionSimplifier). If the inliner          // doesn't run or doesn't inline anything, the NullConstant remains untyped.          // So we should check NullConstants for validity only after reference type propagation. -        DCHECK(graph_in_bad_state_ || -               (!is_after_pass_ && IsPass(SsaBuilder::kSsaBuilderPassName))) -            << instruction->DebugName() << instruction->GetId() << " has invalid rti " -            << (is_after_pass_ ? "after" : "before") << " pass " << pass_name_; +        // +        // Note: The infrastructure to properly type NullConstants everywhere is to complex to add +        // for the benefits. +        StartAttributeStream("klass") << "not_set"; +        DCHECK(!is_after_pass_ +            || !IsPass(ReferenceTypePropagation::kReferenceTypePropagationPassName)) +            << " Expected a valid rti after reference type propagation"; +      } else { +        DCHECK(!is_after_pass_) +            << "Expected a valid rti after reference type propagation";        }      }      if (disasm_info_ != nullptr) { |