changeset 2652:6d19b4f476db

Removed more OSR handling stuff.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 11 May 2011 14:51:33 +0200
parents f9ae687657e8
children 7c8ad40c1f88
files graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.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/ComputeLinearScanOrder.java
diffstat 4 files changed, 2 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java	Wed May 11 14:45:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java	Wed May 11 14:51:33 2011 +0200
@@ -45,16 +45,6 @@
     public static void optimize(IR ir) {
         ControlFlowOptimizer optimizer = new ControlFlowOptimizer(ir);
         List<BlockBegin> code = ir.linearScanOrder();
-
-        // push the OSR entry block to the end so that we're not jumping over it.
-        BlockBegin osrEntry = ((Base) code.get(0).end()).osrEntry();
-        if (osrEntry != null) {
-            int index = osrEntry.linearScanNumber();
-            assert code.get(index) == osrEntry : "wrong index";
-            code.remove(index);
-            code.add(osrEntry);
-        }
-
         optimizer.reorderShortLoops(code);
         optimizer.deleteEmptyBlocks(code);
         optimizer.deleteUnnecessaryJumps(code);
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:45:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 11 14:51:33 2011 +0200
@@ -957,10 +957,6 @@
         return x;
     }
 
-    private boolean hasUncontrollableSideEffects(Value x) {
-        return x instanceof Invoke || x instanceof ResolveClass;
-    }
-
     private BlockBegin blockAtOrNull(int bci) {
         return blockMap.get(bci);
     }
@@ -971,12 +967,12 @@
         return result;
     }
 
-    private Value synchronizedObject(FrameStateAccess curState2, RiMethod target) {
+    private Value synchronizedObject(FrameStateAccess state, RiMethod target) {
         if (isStatic(target.accessFlags())) {
             Constant classConstant = new Constant(target.holder().getEncoding(Representation.JavaClass), graph);
             return appendWithoutOptimization(classConstant, Instruction.SYNCHRONIZATION_ENTRY_BCI);
         } else {
-            return curState2.localAt(0);
+            return state.localAt(0);
         }
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Wed May 11 14:45:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Wed May 11 14:51:33 2011 +0200
@@ -53,14 +53,6 @@
         return defaultSuccessor();
     }
 
-    /**
-     * Gets the OSR entrypoint block, if it exists.
-     * @return the OSR entrypoint bock, if it exists; {@code null} otherwise
-     */
-    public BlockBegin osrEntry() {
-        return blockSuccessorCount() < 2 ? null : blockSuccessor(0);
-    }
-
     @Override
     public void accept(ValueVisitor v) {
         v.visitBase(this);
@@ -69,8 +61,5 @@
     @Override
     public void print(LogStream out) {
         out.print("std entry B").print(standardEntry().blockID);
-        if (blockSuccessors().size() > 1) {
-            out.print(" osr entry B").print(osrEntry().blockID);
-        }
     }
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Wed May 11 14:45:05 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Wed May 11 14:51:33 2011 +0200
@@ -510,22 +510,7 @@
 
         assert startBlock.end() instanceof Base : "start block must end with Base-instruction";
         BlockBegin stdEntry = ((Base) startBlock.end()).standardEntry();
-        BlockBegin osrEntry = ((Base) startBlock.end()).osrEntry();
 
-        BlockBegin suxOfOsrEntry = null;
-        if (osrEntry != null) {
-            // special handling for osr entry:
-            // ignore the edge between the osr entry and its successor for processing
-            // the osr entry block is added manually below
-            assert osrEntry.numberOfSux() == 1 : "osr entry must have exactly one successor";
-            assert osrEntry.suxAt(0).numberOfPreds() >= 2 : "sucessor of osr entry must have two predecessors (otherwise it is not present in normal control flow)";
-
-            suxOfOsrEntry = osrEntry.suxAt(0);
-            decForwardBranches(suxOfOsrEntry);
-
-            computeDominator(osrEntry, startBlock);
-            iterativeDominators = true;
-        }
         computeDominator(stdEntry, startBlock);
 
         // start processing with standard entry block
@@ -539,13 +524,6 @@
 
         do {
             BlockBegin cur = workList.remove(workList.size() - 1);
-
-            if (cur == suxOfOsrEntry) {
-                // the osr entry block is ignored in normal processing : it is never added to the
-                // work list. Instead : it is added as late as possible manually here.
-                appendBlock(osrEntry);
-                computeDominator(cur, osrEntry);
-            }
             appendBlock(cur);
 
             int i;