# HG changeset patch # User Thomas Wuerthinger # Date 1356011017 -3600 # Node ID 75c18356504da58526ce851fa3849faf1085ba60 # Parent 718f6161f3196fac9f00a9b80d8f598747807046 Added capability to return the map of dupblicates when inlining a graph. diff -r 718f6161f319 -r 75c18356504d graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Thu Dec 20 14:42:55 2012 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Thu Dec 20 14:43:37 2012 +0100 @@ -886,7 +886,7 @@ * @param inlineGraph the graph that the invoke will be replaced with * @param receiverNullCheck true if a null check needs to be generated for non-static inlinings, false if no such check is required */ - public static void inline(Invoke invoke, StructuredGraph inlineGraph, boolean receiverNullCheck) { + public static Map inline(Invoke invoke, StructuredGraph inlineGraph, boolean receiverNullCheck) { NodeInputList parameters = invoke.callTarget().arguments(); StructuredGraph graph = (StructuredGraph) invoke.node().graph(); @@ -915,7 +915,7 @@ } } } - replacements.put(entryPointNode, BeginNode.prevBegin(invoke.node())); // ensure proper anchoring of things that where anchored to the StartNode + replacements.put(entryPointNode, BeginNode.prevBegin(invoke.node())); // ensure proper anchoring of things that were anchored to the StartNode assert invoke.node().successors().first() != null : invoke; assert invoke.node().predecessor() != null; @@ -1018,6 +1018,8 @@ invoke.node().replaceAtUsages(null); GraphUtil.killCFG(invoke.node()); + + return duplicates; } public static void receiverNullCheck(Invoke invoke) {