diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-03-04 14:46:47 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-03-10 11:41:22 +0000 |
commit | 3ff386aafefd5282bb76c8a50506a70a4321e698 (patch) | |
tree | 5f6e990553daae150a168f581bac79e659f7f712 /compiler/optimizing/pretty_printer.h | |
parent | 0307b5c91c287e08cd414ecc5de32befceb7e371 (diff) | |
download | art-3ff386aafefd5282bb76c8a50506a70a4321e698.zip art-3ff386aafefd5282bb76c8a50506a70a4321e698.tar.gz art-3ff386aafefd5282bb76c8a50506a70a4321e698.tar.bz2 |
Add register support to the optimizing compiler.
Also make if take an input and build the use list for instructions.
Change-Id: I1938cee7dce5bd4c66b259fa2b431d2c79b3cf82
Diffstat (limited to 'compiler/optimizing/pretty_printer.h')
-rw-r--r-- | compiler/optimizing/pretty_printer.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/compiler/optimizing/pretty_printer.h b/compiler/optimizing/pretty_printer.h index d4b6165..0c0f702 100644 --- a/compiler/optimizing/pretty_printer.h +++ b/compiler/optimizing/pretty_printer.h @@ -27,7 +27,35 @@ class HPrettyPrinter : public HGraphVisitor { virtual void VisitInstruction(HInstruction* instruction) { PrintString(" "); + PrintInt(instruction->id()); + PrintString(": "); PrintString(instruction->DebugName()); + if (instruction->InputCount() != 0) { + PrintString("("); + bool first = true; + for (HInputIterator it(instruction); !it.Done(); it.Advance()) { + if (first) { + first = false; + } else { + PrintString(", "); + } + PrintInt(it.Current()->id()); + } + PrintString(")"); + } + if (instruction->HasUses()) { + PrintString(" ["); + bool first = true; + for (HUseIterator it(instruction); !it.Done(); it.Advance()) { + if (first) { + first = false; + } else { + PrintString(", "); + } + PrintInt(it.Current()->id()); + } + PrintString("]"); + } PrintNewLine(); } |