# HG changeset patch # User Thomas Wuerthinger # Date 1423770416 -3600 # Node ID fcefaa7f103d0980d5aa75aa4aeceb91ff521b06 # Parent fcfd38578a00a51cb83419cc365497c1383b95ab Schedule constants only in last schedule before LIR generation. diff -r fcfd38578a00 -r fcefaa7f103d graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Thu Feb 12 20:38:02 2015 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Thu Feb 12 20:46:56 2015 +0100 @@ -267,6 +267,7 @@ graph.maybeCompress(); SchedulePhase schedule = new SchedulePhase(); + schedule.setScheduleConstants(true); schedule.apply(graph); Debug.dump(schedule, "Final HIR schedule"); return schedule; diff -r fcfd38578a00 -r fcefaa7f103d graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Thu Feb 12 20:38:02 2015 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Thu Feb 12 20:46:56 2015 +0100 @@ -305,6 +305,7 @@ private BlockMap> blockToNodesMap; private BlockMap blockToKillSet; private final SchedulingStrategy selectedStrategy; + private boolean scheduleConstants; public SchedulePhase() { this(OptScheduleOutOfLoops.getValue() ? SchedulingStrategy.LATEST_OUT_OF_LOOPS : SchedulingStrategy.LATEST); @@ -314,6 +315,10 @@ this.selectedStrategy = strategy; } + public void setScheduleConstants(boolean value) { + scheduleConstants = value; + } + @Override protected void run(StructuredGraph graph) { assert GraphOrder.assertNonCyclicGraph(graph); @@ -449,6 +454,9 @@ if (cfg.getNodeToBlock().containsKey(node)) { return; } + if (!scheduleConstants && node instanceof ConstantNode) { + return; + } if (node instanceof VirtualObjectNode) { return; }