# HG changeset patch # User Thomas Wuerthinger # Date 1429570068 -7200 # Node ID 761be5b18c285a0135e95c6e9d4c8d97df5cd165 # Parent eae62344f72c0973e339ef5d7d3ed1815d199610 Add StressInvokeWithExceptionNode flag. diff -r eae62344f72c -r 761be5b18c28 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java --- 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 StressExplicitExceptionCode = new StableOptionValue<>(false); + @Option(help = "Stressed the code emitting explicit exception throwing code.", type = OptionType.Debug) + public static final StableOptionValue StressInvokeWithExceptionNode = new StableOptionValue<>(false); + @Option(help = "", type = OptionType.Debug) public static final OptionValue VerifyPhases = new OptionValue<>(false); diff -r eae62344f72c -r 761be5b18c28 graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- 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); diff -r eae62344f72c -r 761be5b18c28 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java --- 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);