changeset 2832:775c31be565c

Clean up. Removed special exception successors in LIRBlock. Throw no longer a BlockEnd.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 31 May 2011 11:50:19 +0200
parents f072013daba9
children 1cd59ca9ac86 caf55daa41dc
files graal/GraalCompiler/src/com/sun/c1x/alloc/LinearScan.java graal/GraalCompiler/src/com/sun/c1x/graph/IR.java graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java graal/GraalCompiler/src/com/sun/c1x/lir/LIRBlock.java
diffstat 5 files changed, 6 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/alloc/LinearScan.java	Tue May 31 11:32:48 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/alloc/LinearScan.java	Tue May 31 11:50:19 2011 +0200
@@ -1284,23 +1284,6 @@
                 addRegisterHints(op);
 
             } // end of instruction iteration
-
-
-            // (tw) TODO: Check if this matters..
-            // (tw) Make sure that no spill store optimization is applied for phi instructions that flow into exception handlers.
-//            if (block.isExceptionEntry()) {
-//                Instruction firstInstruction = block.getInstructions().get(0);
-//                for (Node n : firstInstruction.usages()) {
-//                    if (n instanceof Phi) {
-//                        Phi phi = (Phi) n;
-//                        Interval interval = intervalFor(phi.operand());
-//                        if (interval != null) {
-//                            interval.setSpillState(SpillState.NoOptimization);
-//                        }
-//                    }
-//                }
-//            }
-
         } // end of block iteration
 
         // add the range [0, 1] to all fixed intervals.
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Tue May 31 11:32:48 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Tue May 31 11:50:19 2011 +0200
@@ -100,11 +100,11 @@
 
         for (Block b : blocks) {
             for (Block succ : b.getSuccessors()) {
-                if (succ.isExceptionEntry()) {
-                    map.get(b).getExceptionHandlerSuccessors().add(map.get(succ));
-                } else {
+//                if (succ.isExceptionEntry()) {
+//                    map.get(b).getExceptionHandlerSuccessors().add(map.get(succ));
+//                } else {
                     map.get(b).blockSuccessors().add(map.get(succ));
-                }
+//                }
             }
 
             for (Block pred : b.getPredecessors()) {
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Tue May 31 11:32:48 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Tue May 31 11:50:19 2011 +0200
@@ -195,9 +195,6 @@
         for (i = cur.numberOfSux() - 1; i >= 0; i--) {
             countEdges(cur.suxAt(i), cur);
         }
-        for (LIRBlock ex : cur.getExceptionHandlerSuccessors()) {
-            countEdges(ex, cur);
-        }
 
         clearActive(cur);
 
@@ -328,9 +325,6 @@
                 for (i = cur.numberOfSux() - 1; i >= 0; i--) {
                     workList.add(cur.suxAt(i));
                 }
-                for (LIRBlock ex : cur.getExceptionHandlerSuccessors()) {
-                    workList.add(ex);
-                }
             }
         } while (!workList.isEmpty());
     }
@@ -488,11 +482,6 @@
                     sortIntoWorkList(sux);
                 }
             }
-            for (LIRBlock ex : cur.getExceptionHandlerSuccessors()) {
-                if (readyForProcessing(ex)) {
-                    sortIntoWorkList(ex);
-                }
-            }
         } while (workList.size() > 0);
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java	Tue May 31 11:32:48 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Throw.java	Tue May 31 11:50:19 2011 +0200
@@ -30,7 +30,7 @@
 /**
  * The {@code Throw} instruction represents a throw of an exception.
  */
-public final class Throw extends BlockEnd implements ExceptionEdgeInstruction {
+public final class Throw extends Instruction implements ExceptionEdgeInstruction {
 
     private static final int INPUT_COUNT = 2;
     private static final int INPUT_EXCEPTION = 0;
@@ -91,7 +91,7 @@
      * @param graph
      */
     public Throw(Value exception, Graph graph) {
-        super(CiKind.Illegal, 0, INPUT_COUNT, SUCCESSOR_COUNT, graph);
+        super(CiKind.Illegal, INPUT_COUNT, SUCCESSOR_COUNT, graph);
         setException(exception);
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/lir/LIRBlock.java	Tue May 31 11:32:48 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/lir/LIRBlock.java	Tue May 31 11:50:19 2011 +0200
@@ -44,7 +44,6 @@
     private List<Node> instructions = new ArrayList<Node>(4);
     private List<LIRBlock> predecessors = new ArrayList<LIRBlock>(4);
     private List<LIRBlock> successors = new ArrayList<LIRBlock>(4);
-    private List<LIRBlock> exceptionHandlerSuccessors = new ArrayList<LIRBlock>(4);
 
     /**
      * Bit map specifying which {@linkplain OperandPool operands} are live upon entry to this block.
@@ -79,10 +78,6 @@
     private int lastLirInstructionID;
     public int blockEntryPco;
 
-    public List<LIRBlock> getExceptionHandlerSuccessors() {
-        return exceptionHandlerSuccessors;
-    }
-
     public LIRBlock(int blockID) {
         this.blockID = blockID;
         loopIndex = -1;