# HG changeset patch # User Roland Schatz # Date 1383063983 -3600 # Node ID 1f7bca29d15ce6ad8a371fc4b5ad98a416c632ac # Parent 37a4252fbcc7bd4e206bf4c42939d69a71a5baee Simplify AMD64ConvertSnippets instantiation code. diff -r 37a4252fbcc7 -r 1f7bca29d15c graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64ConvertSnippets.java --- a/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64ConvertSnippets.java Tue Oct 29 16:56:19 2013 +0100 +++ b/graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64ConvertSnippets.java Tue Oct 29 17:26:23 2013 +0100 @@ -167,20 +167,13 @@ StructuredGraph graph = convert.graph(); - // Insert a unique placeholder node in place of the Convert node so that the - // Convert node can be used as an input to the snippet. All usage of the - // Convert node are replaced by the placeholder which in turn is replaced by the - // snippet. - - LocalNode replacee = graph.addWithoutUnique(new LocalNode(Integer.MAX_VALUE, convert.stamp())); - convert.replaceAtUsages(replacee); Arguments args = new Arguments(key, graph.getGuardsStage()); args.add("input", convert.value()); - args.add("result", convert.graph().unique(new AMD64ConvertNode(convert.opcode, convert.value()))); + args.add("result", graph.unique(new AMD64ConvertNode(convert.opcode, convert.value()))); SnippetTemplate template = template(args); Debug.log("Lowering %s in %s: node=%s, template=%s, arguments=%s", convert.opcode, graph, convert, template, args); - template.instantiate(providers.getMetaAccess(), replacee, DEFAULT_REPLACER, tool, args); + template.instantiate(providers.getMetaAccess(), convert, DEFAULT_REPLACER, tool, args); graph.removeFloating(convert); } }