changeset 4544:447018dd775f

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 09 Feb 2012 13:21:33 +0100
parents c883c38e566f (current diff) f1d3800b59e1 (diff)
children 5d8eaed30aee
files
diffstat 2 files changed, 40 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java	Thu Feb 09 11:45:15 2012 +0100
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/util/InliningUtil.java	Thu Feb 09 13:21:33 2012 +0100
@@ -399,18 +399,27 @@
         private static Invoke duplicateInvokeForInlining(StructuredGraph graph, Invoke invoke, MergeNode exceptionMerge, PhiNode exceptionObjectPhi, boolean useForInlining) {
             Invoke result = (Invoke) invoke.node().copyWithInputs();
             result.setUseForInlining(useForInlining);
+
+            CiKind kind = invoke.node().kind();
+            if (!kind.isVoid()) {
+                FrameState stateAfter = invoke.stateAfter();
+                stateAfter = stateAfter.duplicate(stateAfter.bci);
+                stateAfter.replaceFirstInput(invoke.node(), result.node());
+                result.setStateAfter(stateAfter);
+            }
+
             if (invoke instanceof InvokeWithExceptionNode) {
                 assert exceptionMerge != null && exceptionObjectPhi != null;
 
                 InvokeWithExceptionNode invokeWithException = (InvokeWithExceptionNode) invoke;
                 BeginNode exceptionEdge = invokeWithException.exceptionEdge();
                 ExceptionObjectNode exceptionObject = (ExceptionObjectNode) exceptionEdge.next();
-                FrameState stateAfter = exceptionObject.stateAfter();
+                FrameState stateAfterException = exceptionObject.stateAfter();
 
                 BeginNode newExceptionEdge = (BeginNode) exceptionEdge.copyWithInputs();
                 ExceptionObjectNode newExceptionObject = (ExceptionObjectNode) exceptionObject.copyWithInputs();
                 // set new state (pop old exception object, push new one)
-                newExceptionObject.setStateAfter(stateAfter.duplicateModified(stateAfter.bci, stateAfter.rethrowException(), CiKind.Object, newExceptionObject));
+                newExceptionObject.setStateAfter(stateAfterException.duplicateModified(stateAfterException.bci, stateAfterException.rethrowException(), CiKind.Object, newExceptionObject));
                 newExceptionEdge.setNext(newExceptionObject);
 
                 EndNode endNode = graph.add(new EndNode());
--- a/mx/commands.py	Thu Feb 09 11:45:15 2012 +0100
+++ b/mx/commands.py	Thu Feb 09 13:21:33 2012 +0100
@@ -659,9 +659,35 @@
             f.write(json.dumps(results))
     
 def specjvm2008(args):
-    benchArgs = [a[1:] for a in args if a[0] == '@']
-    vmArgs = [a for a in args if a[0] != '@']
-    sanitycheck.getSPECjvm2008(benchArgs).bench('graal', opts=vmArgs)
+    """run one or all SPECjvm2008 benchmarks
+    
+    All options begining with - will be passed to the vm except for -ikv -wt and -it.
+    Other options are supposed to be benchmark names and will be passed to SPECjvm2008."""
+    benchArgs = [a for a in args if a[0] != '-']
+    vmArgs = [a for a in args if a[0] == '-']
+    wt = None
+    it = None
+    skipValid = False
+    if '-ikv' in vmArgs:
+        skipValid = True
+        vmArgs.remove('-ikv')
+    if '-wt' in vmArgs:
+        wtIdx = args.index('-wt')
+        try:
+            wt = int(args[wtIdx+1])
+        except:
+            mx.abort('-wt (Warmup time) needs a numeric value (seconds)')
+        vmArgs.remove('-wt')
+        benchArgs.remove(args[wtIdx+1])
+    if '-it' in vmArgs:
+        itIdx = args.index('-it')
+        try:
+            it = int(args[itIdx+1])
+        except:
+            mx.abort('-it (Iteration time) needs a numeric value (seconds)')
+        vmArgs.remove('-it')
+        benchArgs.remove(args[itIdx+1])
+    sanitycheck.getSPECjvm2008(benchArgs, skipValid, wt, it).bench('graal', opts=vmArgs)
     
 def hsdis(args):
     """Installs the hsdis library