Mercurial > hg > graal-compiler
changeset 7309:75c18356504d
Added capability to return the map of dupblicates when inlining a graph.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 20 Dec 2012 14:43:37 +0100 |
parents | 718f6161f319 |
children | 79a7b761755c |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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<Node, Node> inline(Invoke invoke, StructuredGraph inlineGraph, boolean receiverNullCheck) { NodeInputList<ValueNode> 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) {