Mercurial > hg > graal-compiler
changeset 13937:814800074308
Allow disabling of redundant move elimination
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 12 Feb 2014 10:23:21 -0800 |
parents | e79579c921ff |
children | aa8fb1cb16d1 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed Feb 12 10:22:48 2014 -0800 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Wed Feb 12 10:23:21 2014 -0800 @@ -280,7 +280,9 @@ try (Scope s = Debug.scope("ControlFlowOptimizations")) { EdgeMoveOptimizer.optimize(lir); ControlFlowOptimizer.optimize(lir); - RedundantMoveElimination.optimize(lir, frameMap, lirGen.getGraph().method()); + if (lirGen.canEliminateRedundantMoves()) { + RedundantMoveElimination.optimize(lir, frameMap, lirGen.getGraph().method()); + } NullCheckOptimizer.optimize(lir, target.implicitNullCheckLimit); Debug.dump(lir, "After control flow optimization");
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Feb 12 10:22:48 2014 -0800 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Wed Feb 12 10:23:21 2014 -0800 @@ -219,6 +219,14 @@ return null; } + /** + * Returns true if the redundant move elimination optimization should be done after register + * allocation. + */ + public boolean canEliminateRedundantMoves() { + return true; + } + @SuppressWarnings("hiding") protected DebugInfoBuilder createDebugInfoBuilder(NodeMap<Value> nodeOperands) { return new DebugInfoBuilder(nodeOperands);