changeset 13222:de8f74d49690

rename Replacements.prepareSnippetCopyAfterInstantiation
author Erik Eckstein <erik.eckstein@oracle.com>
date Tue, 03 Dec 2013 16:06:39 +0100
parents d5c6d9beebe3
children bb35fc7e0d68
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Replacements.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java
diffstat 3 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Replacements.java	Tue Dec 03 16:05:51 2013 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Replacements.java	Tue Dec 03 16:06:39 2013 +0100
@@ -47,12 +47,13 @@
     void registerSnippet(ResolvedJavaMethod method);
 
     /**
-     * Prepares the copy of a snippet graph immediately after instantiation. This can be used to do
-     * node intrinsification for example.
+     * Notifies this object during snippet specialization once the specialized snippet's constant
+     * parameters have been replaced with constant values.
      * 
-     * @param snippetCopy The copy of the snippet graph.
+     * @param specializedSnippet the snippet in the process of being specialized. This is a copy of
+     *            the unspecialized snippet graph created during snippet preparation.
      */
-    void prepareSnippetCopyAfterInstantiation(StructuredGraph snippetCopy);
+    void notifyAfterConstantsBound(StructuredGraph specializedSnippet);
 
     /**
      * Gets the graph that is a substitution for a given method.
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Tue Dec 03 16:05:51 2013 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Tue Dec 03 16:06:39 2013 +0100
@@ -110,13 +110,13 @@
     }
 
     @Override
-    public void prepareSnippetCopyAfterInstantiation(StructuredGraph snippetCopy) {
+    public void notifyAfterConstantsBound(StructuredGraph specializedSnippet) {
 
         // Do deferred intrinsification of node intrinsics
 
-        new NodeIntrinsificationPhase(providers).apply(snippetCopy);
-        new CanonicalizerPhase(true).apply(snippetCopy, new PhaseContext(providers, assumptions));
-        NodeIntrinsificationVerificationPhase.verify(snippetCopy);
+        new NodeIntrinsificationPhase(providers).apply(specializedSnippet);
+        new CanonicalizerPhase(true).apply(specializedSnippet, new PhaseContext(providers, assumptions));
+        NodeIntrinsificationVerificationPhase.verify(specializedSnippet);
     }
 
     @Override
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Tue Dec 03 16:05:51 2013 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java	Tue Dec 03 16:06:39 2013 +0100
@@ -511,7 +511,7 @@
 
         Debug.dump(snippetCopy, "Before specialization");
         if (!nodeReplacements.isEmpty()) {
-            providers.getReplacements().prepareSnippetCopyAfterInstantiation(snippetCopy);
+            providers.getReplacements().notifyAfterConstantsBound(snippetCopy);
         }
 
         // Gather the template parameters