# HG changeset patch # User Josef Eisl # Date 1444910846 -7200 # Node ID 8e5c7be6d1fb58513c92506c33539ee5bcf72663 # Parent 29114298229f60382464ce064ab1368f9989506a Transform AllowObjectConstantToStackMove option into a method of NodeLIRBuilder. diff -r 29114298229f -r 8e5c7be6d1fb graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/BackendOptions.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/BackendOptions.java Tue Nov 03 18:14:26 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/BackendOptions.java Thu Oct 15 14:07:26 2015 +0200 @@ -41,8 +41,6 @@ public static final OptionValue LIROptSSILinearScan = new OptionValue<>(false); @Option(help = "Enable experimental Trace Register Allocation.", type = OptionType.Debug) public static final OptionValue TraceRA = new OptionValue<>(false); - @Option(help = "Support object constant to stack move.", type = OptionType.Debug) - public static final OptionValue AllowObjectConstantToStackMove = new OptionValue<>(true); // @formatter:on } diff -r 29114298229f -r 8e5c7be6d1fb graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Tue Nov 03 18:14:26 2015 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java Thu Oct 15 14:07:26 2015 +0200 @@ -48,7 +48,6 @@ import jdk.vm.ci.meta.PlatformKind; import jdk.vm.ci.meta.Value; -import com.oracle.graal.compiler.common.BackendOptions; import com.oracle.graal.compiler.common.calc.Condition; import com.oracle.graal.compiler.common.cfg.BlockMap; import com.oracle.graal.compiler.common.type.Stamp; @@ -117,7 +116,6 @@ */ public abstract class NodeLIRBuilder implements NodeLIRBuilderTool, LIRGenerationDebugContext { - private final boolean allowObjectConstantToStackMove; private final NodeMap nodeOperands; private final DebugInfoBuilder debugInfoBuilder; @@ -140,7 +138,13 @@ assert nodeMatchRules.lirBuilder == null; nodeMatchRules.lirBuilder = this; - allowObjectConstantToStackMove = BackendOptions.UserOptions.AllowObjectConstantToStackMove.getValue(); + } + + /** + * @return {@code true} if object constant to stack moves are supported. + */ + protected boolean allowObjectConstantToStackMove() { + return true; } public NodeMatchRules getNodeMatchRules() { @@ -292,7 +296,7 @@ * new Variable. */ value = gen.emitMove(value); - } else if (!allowObjectConstantToStackMove && node instanceof ConstantNode && !value.getLIRKind().isValue()) { + } else if (!allowObjectConstantToStackMove() && node instanceof ConstantNode && !value.getLIRKind().isValue()) { /* * Object constants are not allowed as inputs for PHIs. Explicitly create a copy of * this value to force it into a register. The new variable is only used in the PHI.