changeset 2645:b2c1e959be46

Clean up around BlockBegin / StdEntry.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 14:34:29 +0200
parents 4694daa6af3a
children ce054e34fbaf
files graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java graal/GraalCompiler/src/com/sun/c1x/ir/Base.java graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java graal/GraalCompiler/src/com/sun/c1x/lir/LIRList.java
diffstat 6 files changed, 14 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Wed May 11 14:34:29 2011 +0200
@@ -150,9 +150,6 @@
         out.println();
 
         out.print("flags ");
-        if (block.isStandardEntry()) {
-            out.print("\"std\" ");
-        }
         if (block.isExceptionEntry()) {
             out.print("\"ex\" ");
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java	Wed May 11 14:34:29 2011 +0200
@@ -47,10 +47,6 @@
  *
  * If the method has any exception handlers the {@linkplain #exceptionMap exception map} will be created (TBD).
  *
- * A {@link BlockBegin} node with the {@link BlockFlag#StandardEntry} flag is created with bytecode index 0.
- * Note this is distinct from the similar {@link BlockBegin} node assigned to {@link IR#startBlock} by
- * {@link GraphBuilder}.
- *
  * The bytecodes are then scanned linearly looking for bytecodes that contain control transfers, e.g., {@code GOTO},
  * {@code RETURN}, {@code IFGE}, and creating the corresponding entries in {@link #successorMap} and {@link #blockMap}.
  * In addition, if {@link #exceptionMap} is not null, entries are made for any bytecode that can cause an exception.
@@ -364,7 +360,6 @@
         int bci = 0;
         ExceptionMap exceptionMap = this.exceptionMap;
         byte[] code = this.code;
-        make(0).setStandardEntry();
         while (bci < code.length) {
             int opcode = Bytes.beU1(code, bci);
             switch (opcode) {
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:34:29 2011 +0200
@@ -345,7 +345,7 @@
         }
     }
 
-    void genLoadIndexed(CiKind kind) {
+    private void genLoadIndexed(CiKind kind) {
         Value index = frameState.ipop();
         Value array = frameState.apop();
         Value length = append(new ArrayLength(array, graph));
@@ -353,7 +353,7 @@
         frameState.push(kind.stackKind(), v);
     }
 
-    void genStoreIndexed(CiKind kind) {
+    private void genStoreIndexed(CiKind kind) {
         Value value = frameState.pop(kind.stackKind());
         Value index = frameState.ipop();
         Value array = frameState.apop();
@@ -362,7 +362,7 @@
         append(result);
     }
 
-    void stackOp(int opcode) {
+    private void stackOp(int opcode) {
         switch (opcode) {
             case POP: {
                 frameState.xpop();
@@ -443,39 +443,38 @@
 
     }
 
-    void genArithmeticOp(CiKind kind, int opcode) {
+    private void genArithmeticOp(CiKind kind, int opcode) {
         genArithmeticOp(kind, opcode, false);
     }
 
-    void genArithmeticOp(CiKind kind, int opcode, boolean canTrap) {
+    private void genArithmeticOp(CiKind kind, int opcode, boolean canTrap) {
         genArithmeticOp(kind, opcode, kind, kind, canTrap);
     }
 
-    void genArithmeticOp(CiKind result, int opcode, CiKind x, CiKind y, boolean canTrap) {
+    private void genArithmeticOp(CiKind result, int opcode, CiKind x, CiKind y, boolean canTrap) {
         Value yValue = frameState.pop(y);
         Value xValue = frameState.pop(x);
         Value result1 = append(new ArithmeticOp(opcode, result, xValue, yValue, isStrict(method().accessFlags()), canTrap, graph));
         frameState.push(result, result1);
     }
 
-    void genNegateOp(CiKind kind) {
+    private void genNegateOp(CiKind kind) {
         frameState.push(kind, append(new NegateOp(frameState.pop(kind), graph)));
     }
 
-    void genShiftOp(CiKind kind, int opcode) {
+    private void genShiftOp(CiKind kind, int opcode) {
         Value s = frameState.ipop();
         Value x = frameState.pop(kind);
-        // note that strength reduction of e << K >>> K is correctly handled in canonicalizer now
         frameState.push(kind, append(new ShiftOp(opcode, x, s, graph)));
     }
 
-    void genLogicOp(CiKind kind, int opcode) {
+    private void genLogicOp(CiKind kind, int opcode) {
         Value y = frameState.pop(kind);
         Value x = frameState.pop(kind);
         frameState.push(kind, append(new LogicOp(opcode, x, y, graph)));
     }
 
-    void genCompareOp(CiKind kind, int opcode, CiKind resultKind) {
+    private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) {
         Value y = frameState.pop(kind);
         Value x = frameState.pop(kind);
         Value value = append(new CompareOp(opcode, resultKind, x, y, graph));
@@ -484,12 +483,12 @@
         }
     }
 
-    void genConvert(int opcode, CiKind from, CiKind to) {
+    private void genConvert(int opcode, CiKind from, CiKind to) {
         CiKind tt = to.stackKind();
         frameState.push(tt, append(new Convert(opcode, frameState.pop(from.stackKind()), tt, graph)));
     }
 
-    void genIncrement() {
+    private void genIncrement() {
         int index = stream().readLocalIndex();
         int delta = stream().readIncrement();
         Value x = frameState.localAt(index);
@@ -497,12 +496,12 @@
         frameState.storeLocal(index, append(new ArithmeticOp(IADD, CiKind.Int, x, y, isStrict(method().accessFlags()), false, graph)));
     }
 
-    void genGoto(int fromBCI, int toBCI) {
+    private void genGoto(int fromBCI, int toBCI) {
         boolean isSafepoint = !noSafepoints() && toBCI <= fromBCI;
         append(new Goto(blockAt(toBCI), null, isSafepoint, graph));
     }
 
-    void ifNode(Value x, Condition cond, Value y, FrameState stateBefore) {
+    private void ifNode(Value x, Condition cond, Value y, FrameState stateBefore) {
         BlockBegin tsucc = blockAt(stream().readBranchDest());
         BlockBegin fsucc = blockAt(stream().nextBCI());
         int bci = stream().currentBCI();
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Wed May 11 14:34:29 2011 +0200
@@ -42,7 +42,6 @@
      */
     public Base(BlockBegin standardEntry, Graph graph) {
         super(CiKind.Illegal, null, false, 1, INPUT_COUNT, SUCCESSOR_COUNT, graph);
-        assert standardEntry.isStandardEntry();
         setBlockSuccessor(0, standardEntry);
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Wed May 11 14:34:29 2011 +0200
@@ -457,14 +457,6 @@
         }
     }
 
-    public boolean isStandardEntry() {
-        return checkBlockFlag(BlockFlag.StandardEntry);
-    }
-
-    public void setStandardEntry() {
-        setBlockFlag(BlockFlag.StandardEntry);
-    }
-
     public boolean isBackwardBranchTarget() {
         return checkBlockFlag(BlockFlag.BackwardBranchTarget);
     }
@@ -683,9 +675,6 @@
 
         // print flags
         StringBuilder sb = new StringBuilder(8);
-        if (isStandardEntry()) {
-            sb.append('S');
-        }
         if (isExceptionEntry()) {
             sb.append('E');
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/lir/LIRList.java	Wed May 11 14:18:49 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/lir/LIRList.java	Wed May 11 14:34:29 2011 +0200
@@ -419,9 +419,6 @@
         TTY.print("B%d ", x.blockID);
 
         // print flags
-        if (x.checkBlockFlag(BlockBegin.BlockFlag.StandardEntry)) {
-            TTY.print("std ");
-        }
         if (x.checkBlockFlag(BlockBegin.BlockFlag.ExceptionEntry)) {
             TTY.print("ex ");
         }