Add register support to the optimizing compiler.
Also make if take an input and build the use list for instructions.
Change-Id: I1938cee7dce5bd4c66b259fa2b431d2c79b3cf82
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 @@
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();
}