diff graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2793:d3fc4fe063bf

Rename BlockBegin to Merge, remove some Block related member from it. Made CFGPrinter work with the Block class from schedule
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Fri, 27 May 2011 11:08:55 +0200
parents aeccd2af4e9e
children d6bf240963fb
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Thu May 26 11:55:16 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Fri May 27 11:08:55 2011 +0200
@@ -239,7 +239,7 @@
                     }
                 }
             }
-            if (!(instr instanceof BlockBegin)) {
+            if (!(instr instanceof Merge)) {
                 walkState(instr, stateAfter);
                 doRoot(instr);
             }
@@ -853,7 +853,7 @@
             if (rangeDensity >= C1XOptions.RangeTestsSwitchDensity) {
                 visitSwitchRanges(switchRanges, tag, getLIRBlock(x.defaultSuccessor()));
             } else {
-                List<BlockBegin> nonDefaultSuccessors = x.blockSuccessors().subList(0, x.numberOfCases());
+                List<Instruction> nonDefaultSuccessors = x.blockSuccessors().subList(0, x.numberOfCases());
                 LIRBlock[] targets = new LIRBlock[nonDefaultSuccessors.size()];
                 for (int i = 0; i < nonDefaultSuccessors.size(); ++i) {
                     targets[i] = getLIRBlock(nonDefaultSuccessors.get(i));
@@ -1290,7 +1290,7 @@
     private List<Phi> getPhis(LIRBlock block) {
         if (block.getInstructions().size() > 0) {
             Instruction i = block.getInstructions().get(0);
-            if (i instanceof BlockBegin) {
+            if (i instanceof Merge) {
                 List<Phi> result = new ArrayList<Phi>();
                 for (Node n : i.usages()) {
                     if (n instanceof Phi) {