diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-22 15:51:11 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-23 12:02:03 +0100 |
commit | 18efde5017369e005f1e8bcd3bbfb04e85053640 (patch) | |
tree | dcb8bc8db745f3b8096cde55228730e6c402b2c5 /compiler/optimizing/graph_visualizer.cc | |
parent | ef3e89b9281525d6c084136c379346608b44d933 (diff) | |
download | android_art-18efde5017369e005f1e8bcd3bbfb04e85053640.tar.gz android_art-18efde5017369e005f1e8bcd3bbfb04e85053640.tar.bz2 android_art-18efde5017369e005f1e8bcd3bbfb04e85053640.zip |
Fix code generation with materialized conditions.
Change-Id: I8630af3c13fc1950d3fa718d7488407b00898796
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 7f64be42d4..0fb4737db2 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -82,6 +82,8 @@ class HGraphVisualizerPrinter : public HGraphVisitor { } char GetTypeId(Primitive::Type type) { + // Note that Primitive::Descriptor would not work for us + // because it does not handle reference types (that is kPrimNot). switch (type) { case Primitive::kPrimBoolean: return 'z'; case Primitive::kPrimByte: return 'b'; @@ -127,6 +129,12 @@ class HGraphVisualizerPrinter : public HGraphVisitor { } } else if (location.IsConstant()) { output_ << "constant"; + HConstant* constant = location.GetConstant(); + if (constant->IsIntConstant()) { + output_ << " " << constant->AsIntConstant()->GetValue(); + } else if (constant->IsLongConstant()) { + output_ << " " << constant->AsLongConstant()->GetValue(); + } } else if (location.IsInvalid()) { output_ << "invalid"; } else if (location.IsStackSlot()) { |