# HG changeset patch # User Josef Eisl # Date 1423594109 -3600 # Node ID 3fc30638b01083031a027158a46d8e5f410e36c2 # Parent 5ff79efdd04004fbfec5bbd1b17f7ea716783085 LowLevelLowTier: add options for optimizations. diff -r 5ff79efdd040 -r 3fc30638b010 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelLowTier.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelLowTier.java Tue Feb 10 16:03:45 2015 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LowLevelLowTier.java Tue Feb 10 19:48:29 2015 +0100 @@ -24,12 +24,34 @@ import com.oracle.graal.lir.*; import com.oracle.graal.lir.phases.LowLevelLowTierPhase.*; +import com.oracle.graal.options.*; public class LowLevelLowTier extends LowLevelPhaseSuite { + public static class Options { + // @formatter:off + @Option(help = "", type = OptionType.Debug) + public static final OptionValue LowLevelOptEdgeMoveOptimizer = new OptionValue<>(true); + @Option(help = "", type = OptionType.Debug) + public static final OptionValue LowLevelOptControlFlowOptmizer = new OptionValue<>(true); + @Option(help = "", type = OptionType.Debug) + public static final OptionValue LowLevelOptRedundantMoveElimination = new OptionValue<>(true); + @Option(help = "", type = OptionType.Debug) + public static final OptionValue LowLevelOptNullCheckOptimizer = new OptionValue<>(true); + // @formatter:on + } + public LowLevelLowTier() { - appendPhase(new EdgeMoveOptimizer()); - appendPhase(new ControlFlowOptimizer()); - appendPhase(new RedundantMoveElimination()); - appendPhase(new NullCheckOptimizer()); + if (Options.LowLevelOptEdgeMoveOptimizer.getValue()) { + appendPhase(new EdgeMoveOptimizer()); + } + if (Options.LowLevelOptControlFlowOptmizer.getValue()) { + appendPhase(new ControlFlowOptimizer()); + } + if (Options.LowLevelOptRedundantMoveElimination.getValue()) { + appendPhase(new RedundantMoveElimination()); + } + if (Options.LowLevelOptNullCheckOptimizer.getValue()) { + appendPhase(new NullCheckOptimizer()); + } } }