changeset 2581:4a36a0bd6d18

added GraalGraph to classpath, Node as superclass of Value
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 05 May 2011 13:27:48 +0200
parents 4984c8ebd6c7
children 768d77a1c7af
files doc/design/graal_compiler.pdf doc/design/graal_compiler.tex graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java graal/GraalCompiler/src/com/sun/c1x/alloc/RegisterVerifier.java graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/graph/BlockUtil.java graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java graal/GraalCompiler/src/com/sun/c1x/graph/IR.java graal/GraalCompiler/src/com/sun/c1x/ir/Base.java graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java graal/GraalCompiler/src/com/sun/c1x/ir/If.java graal/GraalCompiler/src/com/sun/c1x/ir/LookupSwitch.java graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java graal/GraalCompiler/src/com/sun/c1x/ir/TableSwitch.java graal/GraalCompiler/src/com/sun/c1x/ir/Value.java graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java src/share/vm/runtime/arguments.cpp
diffstat 21 files changed, 81 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
Binary file doc/design/graal_compiler.pdf has changed
--- a/doc/design/graal_compiler.tex	Wed May 04 18:57:26 2011 +0200
+++ b/doc/design/graal_compiler.tex	Thu May 05 13:27:48 2011 +0200
@@ -369,7 +369,6 @@
     \item Array stores: {\tt IASTORE, LASTORE, FASTORE, \\DASTORE, AASTORE, BASTORE, CASTORE, SASTORE}
     \item Field stores: {\tt PUTSTATIC, PUTFIELD}
     \item Method calls: {\tt INVOKEVIRTUAL, INVOKESPECIAL, \\INVOKESTATIC, INVOKEINTERFACE}
-    \item Memory allocations: {\tt NEW, NEWARRAY, ANEWARRAY, \\MULTIANEWARRAY}
     \item Synchronization: {\tt MONITORENTER, MONITOREXIT}
 \end{itemize}
 
--- a/graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java	Thu May 05 13:27:48 2011 +0200
@@ -148,7 +148,7 @@
                 }
 
                 // update the block references in any branching LIR instructions
-                for (BlockBegin pred : block.predecessors()) {
+                for (BlockBegin pred : block.blockPredecessors()) {
                     for (LIRInstruction instr : pred.lir().instructionsList()) {
                         if (instr instanceof LIRBranch) {
                             ((LIRBranch) instr).substitute(block, newTarget);
@@ -269,11 +269,11 @@
                 }
             }
 
-            for (BlockBegin sux : block.end().successors()) {
+            for (BlockBegin sux : block.end().blockSuccessors()) {
                 assert code.contains(sux) : "missing successor from: " + block + "to: " + sux;
             }
 
-            for (BlockBegin pred : block.predecessors()) {
+            for (BlockBegin pred : block.blockPredecessors()) {
                 assert code.contains(pred) : "missing predecessor from: " + block + "to: " + pred;
             }
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/alloc/RegisterVerifier.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/alloc/RegisterVerifier.java	Thu May 05 13:27:48 2011 +0200
@@ -129,7 +129,7 @@
         processOperations(block.lir(), inputState);
 
         // iterate all successors
-        for (BlockBegin succ : block.end().successors()) {
+        for (BlockBegin succ : block.end().blockSuccessors()) {
             processSuccessor(succ, inputState);
         }
     }
--- a/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/debug/CFGPrinter.java	Thu May 05 13:27:48 2011 +0200
@@ -132,7 +132,7 @@
         out.print("to_bci ").println(block.end() == null ? -1 : block.end().bci());
 
         out.print("predecessors ");
-        for (BlockBegin pred : block.predecessors()) {
+        for (BlockBegin pred : block.blockPredecessors()) {
             out.print("\"B").print(pred.blockID).print("\" ");
         }
         out.println();
@@ -590,7 +590,7 @@
         out.print("name \"").print(label).println('"');
         startBlock.iteratePreOrder(new BlockClosure() {
             public void apply(BlockBegin block) {
-                List<BlockBegin> successors = block.end() != null ? block.end().successors() : new ArrayList<BlockBegin>(0);
+                List<BlockBegin> successors = block.end() != null ? block.end().blockSuccessors() : new ArrayList<BlockBegin>(0);
                 printBlock(block, successors, block.exceptionHandlerBlocks(), printHIR, printLIR);
             }
         });
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Thu May 05 13:27:48 2011 +0200
@@ -834,7 +834,7 @@
             if (rangeDensity >= C1XOptions.RangeTestsSwitchDensity) {
                 visitSwitchRanges(switchRanges, tag, x.defaultSuccessor());
             } else {
-                List<BlockBegin> nonDefaultSuccessors = x.successors().subList(0, x.numberOfCases());
+                List<BlockBegin> nonDefaultSuccessors = x.blockSuccessors().subList(0, x.numberOfCases());
                 BlockBegin[] targets = nonDefaultSuccessors.toArray(new BlockBegin[nonDefaultSuccessors.size()]);
                 lir.tableswitch(tag, x.lowKey(), x.defaultSuccessor(), targets);
             }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/BlockUtil.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/BlockUtil.java	Thu May 05 13:27:48 2011 +0200
@@ -36,11 +36,11 @@
      * @param block the block to remove from the graph
      */
     public static void disconnectFromGraph(BlockBegin block) {
-        for (BlockBegin p : block.predecessors()) {
-            p.end().successors().remove(block);
+        for (BlockBegin p : block.blockPredecessors()) {
+            p.end().blockSuccessors().remove(block);
         }
-        for (BlockBegin s : block.end().successors()) {
-            s.predecessors().remove(block);
+        for (BlockBegin s : block.end().blockSuccessors()) {
+            s.blockPredecessors().remove(block);
         }
     }
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java	Thu May 05 13:27:48 2011 +0200
@@ -54,7 +54,7 @@
 
     public void apply(BlockBegin block) {
         if (block.numberOfSux() >= 2) {
-            for (BlockBegin succ : block.end().successors()) {
+            for (BlockBegin succ : block.end().blockSuccessors()) {
                 if (succ.numberOfPreds() >= 2) {
                     // TODO: (tw) probably we don't have to make it a critical edge if succ only contains the _same_ predecessor multiple times.
                     recordCriticalEdge(block, succ);
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java	Thu May 05 13:27:48 2011 +0200
@@ -385,7 +385,7 @@
         curBlock.addExceptionHandler(entry);
 
         // add back-edge from exception handler entry to this block
-        if (!entry.predecessors().contains(curBlock)) {
+        if (!entry.blockPredecessors().contains(curBlock)) {
             entry.addPredecessor(curBlock);
         }
 
@@ -1366,8 +1366,8 @@
         end.setStateAfter(curState.immutableCopy(bci()));
         curBlock.setEnd(end);
         // propagate the state
-        for (BlockBegin succ : end.successors()) {
-            assert succ.predecessors().contains(curBlock);
+        for (BlockBegin succ : end.blockSuccessors()) {
+            assert succ.blockPredecessors().contains(curBlock);
             succ.mergeOrClone(end.stateAfter(), method());
             addToWorkList(succ);
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java	Thu May 05 13:27:48 2011 +0200
@@ -166,7 +166,7 @@
      */
     public BlockBegin splitEdge(BlockBegin source, BlockBegin target) {
         int bci;
-        if (target.predecessors().size() == 1) {
+        if (target.blockPredecessors().size() == 1) {
             bci = target.bci();
         } else {
             bci = source.end().bci();
@@ -199,7 +199,7 @@
         // the successor could be the target of a switch so it might have
         // multiple copies of this predecessor, so substitute the new_sux
         // for the first and delete the rest.
-        List<BlockBegin> list = target.predecessors();
+        List<BlockBegin> list = target.blockPredecessors();
         int x = list.indexOf(source);
         assert x >= 0;
         list.set(x, newSucc);
@@ -216,18 +216,18 @@
 
     public void replaceBlock(BlockBegin oldBlock, BlockBegin newBlock) {
         assert !oldBlock.isExceptionEntry() : "cannot replace exception handler blocks (yet)";
-        for (BlockBegin succ : oldBlock.end().successors()) {
+        for (BlockBegin succ : oldBlock.end().blockSuccessors()) {
             succ.removePredecessor(oldBlock);
         }
-        for (BlockBegin pred : oldBlock.predecessors()) {
+        for (BlockBegin pred : oldBlock.blockPredecessors()) {
             // substitute the new successor for this block in each predecessor
             pred.end().substituteSuccessor(oldBlock, newBlock);
             // and add each predecessor to the successor
             newBlock.addPredecessor(pred);
         }
         // this block is now disconnected; remove all its incoming and outgoing edges
-        oldBlock.predecessors().clear();
-        oldBlock.end().successors().clear();
+        oldBlock.blockPredecessors().clear();
+        oldBlock.end().blockSuccessors().clear();
     }
 
     /**
@@ -235,11 +235,11 @@
      * @param block the block to remove from the graph
      */
     public void disconnectFromGraph(BlockBegin block) {
-        for (BlockBegin p : block.predecessors()) {
-            p.end().successors().remove(block);
+        for (BlockBegin p : block.blockPredecessors()) {
+            p.end().blockSuccessors().remove(block);
         }
-        for (BlockBegin s : block.end().successors()) {
-            s.predecessors().remove(block);
+        for (BlockBegin s : block.end().blockSuccessors()) {
+            s.blockPredecessors().remove(block);
         }
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Base.java	Thu May 05 13:27:48 2011 +0200
@@ -67,7 +67,7 @@
     @Override
     public void print(LogStream out) {
         out.print("std entry B").print(standardEntry().blockID);
-        if (successors().size() > 1) {
+        if (blockSuccessors().size() > 1) {
             out.print(" osr entry B").print(osrEntry().blockID);
         }
     }
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java	Thu May 05 13:27:48 2011 +0200
@@ -118,7 +118,7 @@
      * Gets the list of predecessors of this block.
      * @return the predecessor list
      */
-    public List<BlockBegin> predecessors() {
+    public List<BlockBegin> blockPredecessors() {
         return predecessors;
     }
 
@@ -240,13 +240,13 @@
                 // disconnect this block from the old end
                 old.setBegin(null);
                 // disconnect this block from its current successors
-                for (BlockBegin s : old.successors()) {
-                    s.predecessors().remove(this);
+                for (BlockBegin s : old.blockSuccessors()) {
+                    s.blockPredecessors().remove(this);
                 }
             }
             this.end = end;
             end.setBegin(this);
-            for (BlockBegin s : end.successors()) {
+            for (BlockBegin s : end.blockSuccessors()) {
                 s.addPredecessor(this);
             }
         }
@@ -304,7 +304,7 @@
         while ((block = queue.poll()) != null) {
             closure.apply(block);
             queueBlocks(queue, block.exceptionHandlerBlocks(), mark);
-            queueBlocks(queue, block.end.successors(), mark);
+            queueBlocks(queue, block.end.blockSuccessors(), mark);
             queueBlocks(queue, predecessors ? block.predecessors : null, mark);
         }
     }
@@ -329,7 +329,7 @@
                 iterateReverse(mark, closure, exceptionHandlerBlocks);
             }
             assert e != null : "block must have block end";
-            iterateReverse(mark, closure, e.successors());
+            iterateReverse(mark, closure, e.blockSuccessors());
         }
     }
 
@@ -427,7 +427,7 @@
 
             stateBefore = newState;
         } else {
-            if (!C1XOptions.AssumeVerifiedBytecode && !existingState.isSame(newState)) {
+            if (!C1XOptions.AssumeVerifiedBytecode && !existingState.isCompatibleWith(newState)) {
                 // stacks or locks do not match--bytecodes would not verify
                 throw new CiBailout("stack or locks do not match");
             }
@@ -592,7 +592,7 @@
         if (end != null) {
             builder.append(" -> ");
             boolean hasSucc = false;
-            for (BlockBegin s : end.successors()) {
+            for (BlockBegin s : end.blockSuccessors()) {
                 if (hasSucc) {
                     builder.append(", ");
                 }
@@ -724,9 +724,9 @@
         out.print('[').print(bci()).print(", ").print(end == null ? -1 : end.bci()).print(']');
 
         // print block successors
-        if (end != null && end.successors().size() > 0) {
+        if (end != null && end.blockSuccessors().size() > 0) {
             out.print(" .");
-            for (BlockBegin successor : end.successors()) {
+            for (BlockBegin successor : end.blockSuccessors()) {
                 out.print(" B").print(successor.blockID);
             }
         }
@@ -745,9 +745,9 @@
         }
 
         // print predecessors
-        if (!predecessors().isEmpty()) {
+        if (!blockPredecessors().isEmpty()) {
             out.print(" pred:");
-            for (BlockBegin pred : predecessors()) {
+            for (BlockBegin pred : blockPredecessors()) {
                 out.print(" B").print(pred.blockID);
             }
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java	Thu May 05 13:27:48 2011 +0200
@@ -134,7 +134,7 @@
      * Gets this block end's list of successors.
      * @return the successor list
      */
-    public List<BlockBegin> successors() {
+    public List<BlockBegin> blockSuccessors() {
         return successors;
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java	Thu May 05 13:27:48 2011 +0200
@@ -696,7 +696,7 @@
             assert cur.linearScanNumber() == i : "incorrect linearScanNumber";
             assert cur.linearScanNumber() >= 0 && cur.linearScanNumber() == linearScanOrder.indexOf(cur) : "incorrect linearScanNumber";
 
-            for (BlockBegin sux : cur.end().successors()) {
+            for (BlockBegin sux : cur.end().blockSuccessors()) {
                 assert sux.linearScanNumber() >= 0 && sux.linearScanNumber() == linearScanOrder.indexOf(sux) : "incorrect linearScanNumber";
                 if (!cur.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopEnd)) {
                     assert cur.linearScanNumber() < sux.linearScanNumber() : "invalid order";
@@ -706,7 +706,7 @@
                 }
             }
 
-            for (BlockBegin pred : cur.predecessors()) {
+            for (BlockBegin pred : cur.blockPredecessors()) {
                 assert pred.linearScanNumber() >= 0 && pred.linearScanNumber() == linearScanOrder.indexOf(pred) : "incorrect linearScanNumber";
                 if (!cur.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopHeader)) {
                     assert cur.linearScanNumber() > pred.linearScanNumber() : "invalid order";
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/If.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/If.java	Thu May 05 13:27:48 2011 +0200
@@ -171,9 +171,9 @@
         print(' ').
         print(y()).
         print(" then B").
-        print(successors().get(0).blockID).
+        print(blockSuccessors().get(0).blockID).
         print(" else B").
-        print(successors().get(1).blockID);
+        print(blockSuccessors().get(1).blockID);
         if (isSafepoint()) {
             out.print(" (safepoint)");
         }
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/LookupSwitch.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/LookupSwitch.java	Thu May 05 13:27:48 2011 +0200
@@ -80,7 +80,7 @@
         int l = numberOfCases();
         for (int i = 0; i < l; i++) {
             INSTRUCTION.advance(out);
-            out.printf("case %5d: B%d%n", keyAt(i), successors().get(i).blockID);
+            out.printf("case %5d: B%d%n", keyAt(i), blockSuccessors().get(i).blockID);
         }
         INSTRUCTION.advance(out);
         out.print("default   : B").print(defaultSuccessor().blockID);
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java	Thu May 05 13:27:48 2011 +0200
@@ -103,7 +103,7 @@
         if (block.isExceptionEntry()) {
             state = block.exceptionHandlerStates().get(i);
         } else {
-            state = block.predecessors().get(i).end().stateAfter();
+            state = block.blockPredecessors().get(i).end().stateAfter();
         }
         return inputIn(state);
     }
@@ -125,11 +125,12 @@
      * Get the number of inputs to this phi (i.e. the number of predecessors to the join block).
      * @return the number of inputs in this phi
      */
+    @Override
     public int inputCount() {
         if (block.isExceptionEntry()) {
             return block.exceptionHandlerStates().size();
         } else {
-            return block.predecessors().size();
+            return block.blockPredecessors().size();
         }
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/TableSwitch.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/TableSwitch.java	Thu May 05 13:27:48 2011 +0200
@@ -82,7 +82,7 @@
         int l = numberOfCases();
         for (int i = 0; i < l; i++) {
             INSTRUCTION.advance(out);
-            out.printf("case %5d: B%d%n", lowKey() + i, successors().get(i).blockID);
+            out.printf("case %5d: B%d%n", lowKey() + i, blockSuccessors().get(i).blockID);
         }
         INSTRUCTION.advance(out);
         out.print("default   : B").print(defaultSuccessor().blockID);
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Value.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Value.java	Thu May 05 13:27:48 2011 +0200
@@ -22,7 +22,7 @@
  */
 package com.sun.c1x.ir;
 
-import com.sun.c1x.*;
+import com.oracle.graal.graph.*;
 import com.sun.c1x.debug.*;
 import com.sun.c1x.opt.*;
 import com.sun.cri.ci.*;
@@ -32,7 +32,7 @@
  * This class represents a value within the HIR graph, including local variables, phis, and
  * all other instructions.
  */
-public abstract class Value {
+public abstract class Value extends Node {
 
     public enum Flag {
         NonNull,            // this value is non-null
@@ -51,11 +51,6 @@
     public final CiKind kind;
 
     /**
-     * Unique identifier for this value. This field's value is lazily initialized by {@link #id()}.
-     */
-    private int id;
-
-    /**
      * A mask of {@linkplain Flag flags} denoting extra properties of this value.
      */
     private int flags;
@@ -72,12 +67,35 @@
     /**
      * Creates a new value with the specified kind.
      * @param kind the type of this value
+     * @param inputCount
+     * @param successorCount
+     * @param graph
      */
-    public Value(CiKind kind) {
+    public Value(CiKind kind, int inputCount, int successorCount, Graph graph) {
+        super(inputCount, successorCount, graph == null ? new Graph() : graph);
         assert kind == kind.stackKind() : kind + " != " + kind.stackKind();
         this.kind = kind;
     }
 
+    ///////////////
+    // TODO: remove when Value class changes are completed
+
+    public Value(CiKind kind) {
+        this(kind, 0, 0, null);
+    }
+
+    @Override
+    public Node copy(Graph into) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        throw new CloneNotSupportedException();
+    }
+
+    /////////////////
+
     /**
      * Gets the instruction that should be substituted for this one. Note that this
      * method is recursive; if the substituted instruction has a substitution, then
@@ -297,19 +315,4 @@
 
     public abstract void print(LogStream out);
 
-    /**
-     * This method returns a unique identification number for this value. The number returned is unique
-     * only to the compilation that produced this node and is computed lazily by using the current compilation
-     * for the current thread. Thus the first access is a hash lookup using {@link java.lang.ThreadLocal} and
-     * should not be considered fast. Because of the potentially slow first access, use of this ID should be
-     * restricted to debugging output.
-     * @return a unique ID for this value
-     */
-    public int id() {
-        if (id == 0) {
-            C1XMetrics.UniqueValueIdsAssigned++;
-            id = C1XCompilation.compilation().nextID();
-        }
-        return id;
-    }
 }
--- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Wed May 04 18:57:26 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java	Thu May 05 13:27:48 2011 +0200
@@ -110,10 +110,7 @@
         final MutableFrameState other = new MutableFrameState(bci, localsSize(), maxStackSize());
         if (withLocals && withStack) {
             // fast path: use array copy
-            int valuesSize = valuesSize();
-            assert other.values.length >= valuesSize : "array size: " + other.values.length + ", valuesSize: " + valuesSize + ", maxStackSize: " + maxStackSize() + ", localsSize: " + localsSize();
-            assert values.length >= valuesSize : "array size: " + values.length + ", valuesSize: " + valuesSize + ", maxStackSize: " + maxStackSize() + ", localsSize: " + localsSize();
-            System.arraycopy(values, 0, other.values, 0, valuesSize);
+            System.arraycopy(values, 0, other.values, 0, valuesSize());
             other.stackIndex = stackIndex;
         } else {
             if (withLocals) {
@@ -150,10 +147,10 @@
         return copy(bci, false, false, false);
     }
 
-    public boolean isSame(FrameState other) {
-        assert stackSize() == other.stackSize();
-        assert localsSize() == other.localsSize();
-        assert locksSize() == other.locksSize();
+    public boolean isCompatibleWith(FrameState other) {
+        if (stackSize() != other.stackSize() || localsSize() != other.localsSize() || locksSize() != other.locksSize()) {
+            return false;
+        }
         for (int i = 0; i < stackIndex; i++) {
             Value x = stackAt(i);
             Value y = other.stackAt(i);
--- a/src/share/vm/runtime/arguments.cpp	Wed May 04 18:57:26 2011 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Thu May 05 13:27:48 2011 +0200
@@ -2692,6 +2692,8 @@
       scp_p->add_prefix(temp);
       sprintf(temp, "%s/graal/GraalRuntime/bin", graal_dir);
       scp_p->add_prefix(temp);
+      sprintf(temp, "%s/graal/GraalGraph/bin", graal_dir);
+      scp_p->add_prefix(temp);
       *scp_assembly_required_p = true;
     } else if (match_option(option, "-C1X:", &tail)) { // -C1X:xxxx
       // Option for the C1X compiler.