# HG changeset patch # User Doug Simon # Date 1386937186 -3600 # Node ID 6dd9a1455e648f25077df4ad79dfb489384881b8 # Parent 323d99404728b1221bdc72085fc7f29c9af24e8c renamed PlaceholderOp to NoOp diff -r 323d99404728 -r 6dd9a1455e64 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Fri Dec 13 13:18:01 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Fri Dec 13 13:19:46 2013 +0100 @@ -48,7 +48,7 @@ import com.oracle.graal.hotspot.nodes.*; import com.oracle.graal.hotspot.stubs.*; import com.oracle.graal.lir.*; -import com.oracle.graal.lir.StandardOp.PlaceholderOp; +import com.oracle.graal.lir.StandardOp.NoOp; import com.oracle.graal.lir.StandardOp.SaveRegistersOp; import com.oracle.graal.lir.amd64.*; import com.oracle.graal.lir.amd64.AMD64ControlFlow.CondMoveOp; @@ -93,14 +93,14 @@ */ class SaveRbp { - final PlaceholderOp placeholder; + final NoOp placeholder; /** * The slot reserved for saving RBP. */ final StackSlot reservedSlot; - public SaveRbp(PlaceholderOp placeholder) { + public SaveRbp(NoOp placeholder) { this.placeholder = placeholder; this.reservedSlot = frameMap.allocateSpillSlot(Kind.Long); assert reservedSlot.getRawOffset() == -16 : reservedSlot.getRawOffset(); @@ -172,7 +172,7 @@ emitIncomingValues(params); - saveRbp = new SaveRbp(new PlaceholderOp(currentBlock, lir.lir(currentBlock).size())); + saveRbp = new SaveRbp(new NoOp(currentBlock, lir.lir(currentBlock).size())); append(saveRbp.placeholder); for (LocalNode local : graph.getNodes(LocalNode.class)) { @@ -433,6 +433,7 @@ @Override public void beforeRegisterAllocation() { + super.beforeRegisterAllocation(); boolean hasDebugInfo = lir.hasDebugInfo(); AllocatableValue savedRbp = saveRbp.finalize(hasDebugInfo); if (hasDebugInfo) { diff -r 323d99404728 -r 6dd9a1455e64 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Dec 13 13:18:01 2013 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java Fri Dec 13 13:19:46 2013 +0100 @@ -174,9 +174,10 @@ } /** - * Placeholder for a LIR instruction that will be subsequently replaced. + * A LIR operation that does nothing. If the operation records its position, it can be + * subsequently {@linkplain #replace(LIR, LIRInstruction) replaced}. */ - public static class PlaceholderOp extends LIRInstruction { + public static class NoOp extends LIRInstruction { /** * The block in which this instruction is located. @@ -188,7 +189,7 @@ */ final int index; - public PlaceholderOp(Block block, int index) { + public NoOp(Block block, int index) { this.block = block; this.index = index; } @@ -199,7 +200,9 @@ @Override public void emitCode(CompilationResultBuilder crb) { - throw new GraalInternalError(this + " should have been replaced"); + if (block != null) { + throw new GraalInternalError(this + " should have been replaced"); + } } } }