Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java @ 17338:1778c3208bc5
reduce or eliminate redundant writes during Node cloning
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 04 Oct 2014 01:25:59 +0200 |
parents | c9bb0da795d4 |
children | 3457f147a24f |
line wrap: on
line diff
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Fri Oct 03 23:44:49 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Sat Oct 04 01:25:59 2014 +0200 @@ -29,6 +29,7 @@ import com.oracle.graal.compiler.common.*; import com.oracle.graal.debug.*; +import com.oracle.graal.debug.internal.*; import com.oracle.graal.graph.Node.ValueNumberable; import com.oracle.graal.graph.iterators.*; import com.oracle.graal.options.*; @@ -845,9 +846,13 @@ } + private static final DebugTimer DuplicateGraph = Debug.timer("DuplicateGraph"); + @SuppressWarnings("all") public Map<Node, Node> addDuplicates(Iterable<Node> newNodes, final Graph oldGraph, int estimatedNodeCount, DuplicationReplacement replacements) { - return NodeClass.addGraphDuplicate(this, oldGraph, estimatedNodeCount, newNodes, replacements); + try (TimerCloseable s = DuplicateGraph.start()) { + return NodeClass.addGraphDuplicate(this, oldGraph, estimatedNodeCount, newNodes, replacements); + } } public boolean isFrozen() {