diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-24 12:43:16 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-28 16:21:40 +0100 |
commit | c32e770f21540e4e9eda6dc7f770e745d33f1b9f (patch) | |
tree | 56a76d7399bf749a4500fb60483e0dc075a24ee7 /compiler/optimizing/pretty_printer.h | |
parent | 618a87009202dc959c935ed8f237ae32bdec57d0 (diff) | |
download | art-c32e770f21540e4e9eda6dc7f770e745d33f1b9f.zip art-c32e770f21540e4e9eda6dc7f770e745d33f1b9f.tar.gz art-c32e770f21540e4e9eda6dc7f770e745d33f1b9f.tar.bz2 |
Add a Transform to SSA phase to the optimizing compiler.
Change-Id: Ia9700756a0396d797a00b529896487d52c989329
Diffstat (limited to 'compiler/optimizing/pretty_printer.h')
-rw-r--r-- | compiler/optimizing/pretty_printer.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/optimizing/pretty_printer.h b/compiler/optimizing/pretty_printer.h index 606c915..c82d0cc 100644 --- a/compiler/optimizing/pretty_printer.h +++ b/compiler/optimizing/pretty_printer.h @@ -25,11 +25,19 @@ class HPrettyPrinter : public HGraphVisitor { public: explicit HPrettyPrinter(HGraph* graph) : HGraphVisitor(graph) { } - virtual void VisitInstruction(HInstruction* instruction) { + void PrintPreInstruction(HInstruction* instruction) { PrintString(" "); PrintInt(instruction->GetId()); PrintString(": "); + } + + virtual void VisitInstruction(HInstruction* instruction) { + PrintPreInstruction(instruction); PrintString(instruction->DebugName()); + PrintPostInstruction(instruction); + } + + void PrintPostInstruction(HInstruction* instruction) { if (instruction->InputCount() != 0) { PrintString("("); bool first = true; @@ -46,13 +54,13 @@ class HPrettyPrinter : public HGraphVisitor { if (instruction->HasUses()) { PrintString(" ["); bool first = true; - for (HUseIterator it(instruction); !it.Done(); it.Advance()) { + for (HUseIterator<HInstruction> it(instruction->GetUses()); !it.Done(); it.Advance()) { if (first) { first = false; } else { PrintString(", "); } - PrintInt(it.Current()->GetId()); + PrintInt(it.Current()->GetUser()->GetId()); } PrintString("]"); } |