Mercurial > hg > graal-compiler
changeset 14844:b9b1129a5d85
Fix NodeLIRGenerator.append() issue.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 26 Mar 2014 15:04:03 +0100 |
parents | dd75a505f1b6 |
children | ba13350ee179 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRGenerator.java |
diffstat | 2 files changed, 9 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Mar 26 13:15:08 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Mar 26 15:04:03 2014 +0100 @@ -141,9 +141,6 @@ Map<Constant, LoadConstant> constantLoads; - private ValueNode currentInstruction; - private ValueNode lastInstructionPrinted; // Debugging only - protected LIRGenerationResult res; /** @@ -303,13 +300,13 @@ return res.getFrameMap().registerConfig.getReturnRegister(kind).asValue(kind); } - public void append(LIRInstruction op) { + protected void append(LIRInstruction op) { if (printIRWithLIR && !TTY.isSuppressed()) { - if (currentInstruction != null && lastInstructionPrinted != currentInstruction) { - lastInstructionPrinted = currentInstruction; - InstructionPrinter ip = new InstructionPrinter(TTY.out()); - ip.printInstructionListing(currentInstruction); - } + // if (currentInstruction != null && lastInstructionPrinted != currentInstruction) { + // lastInstructionPrinted = currentInstruction; + // InstructionPrinter ip = new InstructionPrinter(TTY.out()); + // ip.printInstructionListing(currentInstruction); + // } TTY.println(op.toStringWithIdPrefix()); TTY.println(); }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRGenerator.java Wed Mar 26 13:15:08 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRGenerator.java Wed Mar 26 15:04:03 2014 +0100 @@ -54,7 +54,7 @@ /** * This class traverses the HIR instructions and generates LIR instructions from them. */ -public abstract class NodeLIRGenerator implements NodeMappableLIRGenerator, NodeLIRGeneratorTool { +public abstract class NodeLIRGenerator implements NodeLIRGeneratorTool { public static class Options { // @formatter:off @@ -225,18 +225,15 @@ return res.getFrameMap().registerConfig.getReturnRegister(kind).asValue(kind); } - public void append(LIRInstruction op) { + final protected void append(LIRInstruction op) { if (printIRWithLIR && !TTY.isSuppressed()) { if (currentInstruction != null && lastInstructionPrinted != currentInstruction) { lastInstructionPrinted = currentInstruction; InstructionPrinter ip = new InstructionPrinter(TTY.out()); ip.printInstructionListing(currentInstruction); } - TTY.println(op.toStringWithIdPrefix()); - TTY.println(); } - assert LIRVerifier.verify(op); - res.getLIR().getLIRforBlock(gen.getCurrentBlock()).add(op); + gen.append(op); } public final void doBlockStart(AbstractBlock<?> block) {