diff graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2780:79dda81dd337

Cleanup
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 25 May 2011 11:12:51 +0200
parents 93ec3f067420
children 915456e4959e
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Wed May 25 11:04:59 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Wed May 25 11:12:51 2011 +0200
@@ -24,7 +24,6 @@
 
 import java.util.*;
 
-import com.oracle.graal.graph.*;
 import com.oracle.max.graal.schedule.*;
 import com.sun.c1x.*;
 import com.sun.c1x.debug.*;
@@ -109,9 +108,6 @@
 
 
      // TODO(tw): Schedule nodes within a block.
-        //computeLinearScanOrder();
-
-//        assert orderedBlocks.size() == lirBlocks.size();
 
 
         CriticalEdgeFinder finder = new CriticalEdgeFinder(lirBlocks, compilation.graph);
@@ -137,26 +133,6 @@
         int z = 0;
         for (LIRBlock b : orderedBlocks) {
             b.setLinearScanNumber(z++);
-
-        /*    TTY.println();
-
-            for (Instruction i : b.getInstructions()) {
-                if (i instanceof BlockBegin) {
-                    TTY.println("BlockBegin #" + ((BlockBegin) i).blockID);
-
-                    TTY.print("    => succs: ");
-                    for (LIRBlock succBlock : b.blockSuccessors()) {
-                        TTY.print("B#" + ((BlockBegin) succBlock.getInstructions().get(0)).blockID);
-                    }
-                    TTY.print("    => ex: ");
-                    for (LIRBlock succBlock : b.getExceptionHandlerSuccessors()) {
-                        TTY.print("B#" + ((BlockBegin) succBlock.getInstructions().get(0)).blockID);
-                    }
-                    TTY.println();
-                } else {
-                    TTY.println(i.getClass().getSimpleName() + " #" + i.id());
-                }
-            }*/
         }
 
 
@@ -176,55 +152,6 @@
         }
     }
 
-    private Map<Value, LIRBlock> computeLinearScanOrder() {
-        return makeLinearScanOrder();
-    }
-
-    private Map<Value, LIRBlock> makeLinearScanOrder() {
-/*
-        if (orderedBlocks == null) {
-
-            Map<Value, LIRBlock> valueToBlock = new HashMap<Value, LIRBlock>();
-            ComputeLinearScanOrder computeLinearScanOrder = new ComputeLinearScanOrder(compilation.stats.blockCount, getHIRStartBlock());
-            List<BlockBegin> blocks = computeLinearScanOrder.linearScanOrder();
-            orderedBlocks = new ArrayList<LIRBlock>();
-
-            int z = 0;
-            for (BlockBegin bb : blocks) {
-                LIRBlock lirBlock = new LIRBlock(z);
-                lirBlock.getInstructions().add(bb);
-                valueToBlock.put(bb, lirBlock);
-                lirBlock.setLinearScanNumber(bb.linearScanNumber());
-                // TODO(tw): Initialize LIRBlock.linearScanLoopHeader and LIRBlock.linearScanLoopEnd
-                orderedBlocks.add(lirBlock);
-                ++z;
-            }
-
-            z = 0;
-            for (BlockBegin bb : blocks) {
-                LIRBlock lirBlock = orderedBlocks.get(z);
-                for (int i = 0; i < bb.numberOfPreds(); ++i) {
-                    lirBlock.blockPredecessors().add(valueToBlock.get(bb.predAt(i).block()));
-                }
-
-                BlockEnd end = bb.end();
-                for (int i = 0; i < end.blockSuccessorCount(); ++i) {
-                    lirBlock.blockSuccessors().add(valueToBlock.get(end.blockSuccessor(i)));
-                }
-
-                Instruction first = bb;
-                while (first != null) {
-                    lirBlock.getInstructions().add(first);
-                    first = first.next();
-                }
-                ++z;
-            }
-
-        }*/
-        return null;
-        //return valueToBlock;
-    }
-
     /**
      * Gets the linear scan ordering of blocks as a list.
      * @return the blocks in linear scan order