Mercurial > hg > truffle
changeset 19328:fcefaa7f103d
Schedule constants only in last schedule before LIR generation.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 12 Feb 2015 20:46:56 +0100 |
parents | fcfd38578a00 |
children | 57c53b1044a7 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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<List<ValueNode>> blockToNodesMap; private BlockMap<LocationSet> 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; }