Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/debug/BlockPrinter.java @ 2801:2af109bec0c0
Make block contains a list of nodes instead a list of instructions.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 15:11:34 +0200 |
parents | d3fc4fe063bf |
children |
comparison
equal
deleted
inserted
replaced
2800:e3a0630a1dab | 2801:2af109bec0c0 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.sun.c1x.debug; | 23 package com.sun.c1x.debug; |
24 | 24 |
25 import com.oracle.graal.graph.*; | |
25 import com.oracle.max.graal.schedule.*; | 26 import com.oracle.max.graal.schedule.*; |
26 import com.sun.c1x.graph.*; | 27 import com.sun.c1x.graph.*; |
27 import com.sun.c1x.ir.*; | 28 import com.sun.c1x.ir.*; |
28 import com.sun.c1x.util.*; | 29 import com.sun.c1x.util.*; |
29 import com.sun.c1x.value.*; | 30 import com.sun.c1x.value.*; |
42 } | 43 } |
43 | 44 |
44 public void apply(Block block) { | 45 public void apply(Block block) { |
45 if (cfgOnly) { | 46 if (cfgOnly) { |
46 if (block.getInstructions().size() > 0) { | 47 if (block.getInstructions().size() > 0) { |
47 ip.printInstruction(block.getInstructions().get(0)); | 48 ip.printInstruction((Instruction) block.getInstructions().get(0)); |
48 } else { | 49 } else { |
49 ip.out().println("Empty block"); | 50 ip.out().println("Empty block"); |
50 } | 51 } |
51 ip.out().println(); | 52 ip.out().println(); |
52 } else { | 53 } else { |
58 LogStream out = ip.out(); | 59 LogStream out = ip.out(); |
59 out.println(); | 60 out.println(); |
60 | 61 |
61 ip.printInstructionListingHeader(); | 62 ip.printInstructionListingHeader(); |
62 | 63 |
63 for (Instruction i : block.getInstructions()) { | 64 for (Node i : block.getInstructions()) { |
64 ip.printInstructionListing(i); | 65 if (i instanceof Instruction) { |
66 ip.printInstructionListing((Instruction) i); | |
67 } | |
65 } | 68 } |
66 out.println(); | 69 out.println(); |
67 | 70 |
68 } | 71 } |
69 | 72 |