changeset 12625:1f7bca29d15c

Simplify AMD64ConvertSnippets instantiation code.
author Roland Schatz <roland.schatz@oracle.com>
date Tue, 29 Oct 2013 17:26:23 +0100
parents 37a4252fbcc7
children e09959e910f7
files graal/com.oracle.graal.replacements.amd64/src/com/oracle/graal/replacements/amd64/AMD64ConvertSnippets.java
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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);
         }
     }