changeset 14920:dadb07012689

Remove duplicate methods from NodeLIRBuilder and LIRGenerator.
author Josef Eisl <josef.eisl@jku.at>
date Tue, 01 Apr 2014 10:48:04 +0200
parents bd08e610e6f3
children 88dfaf6448e0
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/NodeLIRBuilder.java
diffstat 2 files changed, 2 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Mon Mar 31 19:00:13 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Tue Apr 01 10:48:04 2014 +0200
@@ -362,10 +362,6 @@
         ((LabelOp) res.getLIR().getLIRforBlock(currentBlock).get(0)).setIncomingValues(params);
     }
 
-    protected PlatformKind getPhiKind(PhiNode phi) {
-        return phi.getKind();
-    }
-
     public abstract void emitJump(LabelRef label);
 
     public abstract void emitCompareBranch(Value left, Value right, Condition cond, boolean unorderedIsTrue, LabelRef trueDestination, LabelRef falseDestination, double trueDestinationProbability);
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java	Mon Mar 31 19:00:13 2014 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java	Tue Apr 01 10:48:04 2014 +0200
@@ -33,7 +33,6 @@
 
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
-import com.oracle.graal.asm.*;
 import com.oracle.graal.compiler.gen.LIRGenerator.LoadConstant;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.debug.*;
@@ -194,39 +193,8 @@
         gen.append(op);
     }
 
-    public final void doBlockStart(AbstractBlock<?> block) {
-        if (printIRWithLIR) {
-            TTY.print(block.toString());
-        }
-
-        gen.setCurrentBlock(block);
-
-        // set up the list of LIR instructions
-        assert res.getLIR().getLIRforBlock(block) == null : "LIR list already computed for this block";
-        res.getLIR().setLIRforBlock(block, new ArrayList<LIRInstruction>());
-
-        append(new LabelOp(new Label(block.getId()), block.isAligned()));
-
-        if (traceLevel >= 1) {
-            TTY.println("BEGIN Generating LIR for block B" + block.getId());
-        }
-    }
-
-    public final void doBlockEnd(AbstractBlock<?> block) {
-
-        if (traceLevel >= 1) {
-            TTY.println("END Generating LIR for block B" + block.getId());
-        }
-
-        gen.setCurrentBlock(null);
-
-        if (printIRWithLIR) {
-            TTY.println();
-        }
-    }
-
     public void doBlock(Block block, StructuredGraph graph, BlockMap<List<ScheduledNode>> blockMap) {
-        doBlockStart(block);
+        gen.doBlockStart(block);
 
         if (block == res.getLIR().getControlFlowGraph().getStartBlock()) {
             assert block.getPredecessorCount() == 0;
@@ -285,7 +253,7 @@
         }
 
         assert verifyBlock(res.getLIR(), block);
-        doBlockEnd(block);
+        gen.doBlockEnd(block);
     }
 
     private static final DebugMetric MemoryFoldSuccess = Debug.metric("MemoryFoldSuccess");