# HG changeset patch # User Erik Eckstein # Date 1386083199 -3600 # Node ID de8f74d496907169e50763a5ab39b4f23b0d23d0 # Parent d5c6d9beebe3fe73f9c81c2a1611ec76b0af2227 rename Replacements.prepareSnippetCopyAfterInstantiation diff -r d5c6d9beebe3 -r de8f74d49690 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/Replacements.java --- 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. diff -r d5c6d9beebe3 -r de8f74d49690 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- 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 diff -r d5c6d9beebe3 -r de8f74d49690 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java --- 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