# HG changeset patch # User Bernhard Urban # Date 1373023698 -7200 # Node ID 5f016460f95b0270f4f3a5cd8c029821ab2a6671 # Parent eeb80dcd60d850a3bc2e12be397d3ea4a18e1318 scheduling: remove duplicated code check is already done in CFG.commonDominator() diff -r eeb80dcd60d8 -r 5f016460f95b 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 Jul 04 15:30:38 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Fri Jul 05 13:28:18 2013 +0200 @@ -23,6 +23,7 @@ package com.oracle.graal.phases.schedule; import static com.oracle.graal.api.meta.LocationIdentity.*; +import static com.oracle.graal.nodes.cfg.ControlFlowGraph.*; import static com.oracle.graal.phases.GraalOptions.*; import java.util.*; @@ -335,7 +336,7 @@ @Override public void apply(Block newBlock) { - this.block = getCommonDominator(this.block, newBlock); + this.block = commonDominator(this.block, newBlock); } } @@ -487,16 +488,6 @@ // now true usages are ready } - private static Block getCommonDominator(Block a, Block b) { - if (a == null) { - return b; - } - if (b == null) { - return a; - } - return ControlFlowGraph.commonDominator(a, b); - } - private void sortNodesWithinBlocks(StructuredGraph graph, SchedulingStrategy strategy) { NodeBitMap visited = graph.createNodeBitMap(); for (Block b : cfg.getBlocks()) {