Mercurial > hg > graal-compiler
changeset 22936:8e5c7be6d1fb
Transform AllowObjectConstantToStackMove option into a method of NodeLIRBuilder.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 15 Oct 2015 14:07:26 +0200 |
parents | 29114298229f |
children | a544264916b8 |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/BackendOptions.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/NodeLIRBuilder.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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<Boolean> LIROptSSILinearScan = new OptionValue<>(false); @Option(help = "Enable experimental Trace Register Allocation.", type = OptionType.Debug) public static final OptionValue<Boolean> TraceRA = new OptionValue<>(false); - @Option(help = "Support object constant to stack move.", type = OptionType.Debug) - public static final OptionValue<Boolean> AllowObjectConstantToStackMove = new OptionValue<>(true); // @formatter:on }
--- 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<Value> 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.