# HG changeset patch # User Josef Eisl # Date 1395842643 -3600 # Node ID b9b1129a5d85be761b5c48e18467e624cea5df22 # Parent dd75a505f1b6e937841fcdfb87f09a8c94c14bbb Fix NodeLIRGenerator.append() issue. diff -r dd75a505f1b6 -r b9b1129a5d85 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java --- 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 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(); } diff -r dd75a505f1b6 -r b9b1129a5d85 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRGenerator.java --- 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) {