changeset 21058:761be5b18c28

Add StressInvokeWithExceptionNode flag.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 21 Apr 2015 00:47:48 +0200
parents eae62344f72c
children 59632bb8e4ad
files graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java	Mon Apr 20 22:42:18 2015 +0200
+++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java	Tue Apr 21 00:47:48 2015 +0200
@@ -122,6 +122,9 @@
     @Option(help = "Stressed the code emitting explicit exception throwing code.", type = OptionType.Debug)
     public static final StableOptionValue<Boolean> StressExplicitExceptionCode = new StableOptionValue<>(false);
 
+    @Option(help = "Stressed the code emitting explicit exception throwing code.", type = OptionType.Debug)
+    public static final StableOptionValue<Boolean> StressInvokeWithExceptionNode = new StableOptionValue<>(false);
+
     @Option(help = "", type = OptionType.Debug)
     public static final OptionValue<Boolean> VerifyPhases = new OptionValue<>(false);
 
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Mon Apr 20 22:42:18 2015 +0200
+++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java	Tue Apr 21 00:47:48 2015 +0200
@@ -1152,7 +1152,8 @@
                 // be conservative if information was not recorded (could result in endless
                 // recompiles otherwise)
                 Invoke invoke;
-                if (graphBuilderConfig.omitAllExceptionEdges() || (optimisticOpts.useExceptionProbability() && profilingInfo != null && profilingInfo.getExceptionSeen(bci()) == TriState.FALSE)) {
+                if (!StressInvokeWithExceptionNode.getValue() &&
+                                (graphBuilderConfig.omitAllExceptionEdges() || (optimisticOpts.useExceptionProbability() && profilingInfo != null && profilingInfo.getExceptionSeen(bci()) == TriState.FALSE))) {
                     invoke = createInvoke(callTarget, resultType);
                 } else {
                     invoke = createInvokeWithException(callTarget, resultType);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java	Mon Apr 20 22:42:18 2015 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java	Tue Apr 21 00:47:48 2015 +0200
@@ -433,6 +433,7 @@
         assert node != null && newNode != null && node.isAlive() && newNode.isAlive() : "cannot add " + newNode + " before " + node;
         assert node.predecessor() != null && node.predecessor() instanceof FixedWithNextNode : "cannot add " + newNode + " before " + node;
         assert newNode.next() == null : newNode;
+        assert !(node instanceof AbstractMergeNode);
         FixedWithNextNode pred = (FixedWithNextNode) node.predecessor();
         pred.setNext(newNode);
         newNode.setNext(node);