diff graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java @ 2718:c1ce2a53d6c3

Attempt to remove dependency between backend and BlockBegin.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 16:05:42 +0200
parents c1a9bf38da28
children ae1c50a03297
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 19 14:31:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 19 16:05:42 2011 +0200
@@ -105,7 +105,11 @@
     private BlockBegin dominator;
 
     // LIR block
-    public final LIRBlock lirBlock = new LIRBlock();
+    private LIRBlock lirBlock;
+
+    public void setLIRBlock(LIRBlock block) {
+        this.lirBlock = block;
+    }
 
     /**
      * Index of bytecode that generated this node when appended in a basic block.
@@ -164,22 +168,6 @@
         return linearScanNumber;
     }
 
-    /**
-     * Gets the loop depth of this block.
-     * @return the loop depth
-     */
-    public int loopDepth() {
-        return lirBlock.loopDepth;
-    }
-
-    /**
-     * Gets the loop index of this block.
-     * @return the loop index
-     */
-    public int loopIndex() {
-        return lirBlock.loopIndex;
-    }
-
     public void setDepthFirstNumber(int depthFirstNumber) {
         assert depthFirstNumber >= 0;
         this.depthFirstNumber = depthFirstNumber;
@@ -189,14 +177,6 @@
         this.linearScanNumber = linearScanNumber;
     }
 
-    public void setLoopDepth(int loopDepth) {
-        this.lirBlock.loopDepth = loopDepth;
-    }
-
-    public void setLoopIndex(int loopIndex) {
-        this.lirBlock.loopIndex = loopIndex;
-    }
-
     /**
      * Set a flag on this block.
      * @param flag the flag to set
@@ -512,10 +492,6 @@
         return lirBlock().label;
     }
 
-    public void setLir(LIRList lir) {
-        lirBlock().setLir(lir);
-    }
-
     public LIRList lir() {
         return lirBlock().lir();
     }
@@ -524,14 +500,6 @@
         return lirBlock;
     }
 
-    public int blockEntryPco() {
-        return lirBlock == null ? 0 : lirBlock.blockEntryPco;
-    }
-
-    public void setBlockEntryPco(int codeOffset) {
-        lirBlock().blockEntryPco = codeOffset;
-    }
-
     public Instruction predAt(int j) {
         return (Instruction) predecessors().get(j);
     }