File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,13 @@ public <T> T getInjectedArgument(Class<T> capability) {
274
274
return super .getInjectedArgument (capability );
275
275
}
276
276
277
+ public ResolvedJavaMethod findSnippetMethod (ResolvedJavaMethod thisMethod ) {
278
+ if (snippetEncoder == null ) {
279
+ throw new GraalError ("findSnippetMethod called before initialization of Replacements" );
280
+ }
281
+ return snippetEncoder .findSnippetMethod (thisMethod );
282
+ }
283
+
277
284
public static MetaAccessProvider noticeTypes (MetaAccessProvider metaAccess ) {
278
285
if (inImageBuildtimeCode ()) {
279
286
return SymbolicSnippetEncoder .noticeTypes (metaAccess );
Original file line number Diff line number Diff line change 50
50
import jdk .graal .compiler .options .OptionValues ;
51
51
import jdk .graal .compiler .replacements .GraphKit ;
52
52
import jdk .graal .compiler .replacements .nodes .ReadRegisterNode ;
53
+ import jdk .graal .compiler .serviceprovider .GraalServices ;
53
54
import jdk .vm .ci .hotspot .HotSpotJVMCIRuntime ;
54
55
import jdk .vm .ci .hotspot .HotSpotSignature ;
55
56
import jdk .vm .ci .meta .JavaMethod ;
@@ -275,6 +276,10 @@ private ResolvedJavaMethod getGraphMethod() {
275
276
if (thisMethod == null ) {
276
277
throw new InternalError ("Can't find " + getClass ().getSimpleName () + ".getGraph" );
277
278
}
279
+ if (GraalServices .isBuildingLibgraal ()) {
280
+ HotSpotReplacementsImpl replacements = (HotSpotReplacementsImpl ) providers .getReplacements ();
281
+ replacements .findSnippetMethod (thisMethod );
282
+ }
278
283
return thisMethod ;
279
284
}
280
285
You can’t perform that action at this time.
0 commit comments