Skip to content

Commit 0add584

Browse files
committed
Ensure trivial inlining is not triggered for methods where the graph is unavailable
1 parent b65daf6 commit 0add584

File tree

1 file changed

+11
-11
lines changed
  • substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/code

1 file changed

+11
-11
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/code/CompileQueue.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -757,17 +757,7 @@ class InliningGraphDecoder extends PEGraphDecoder {
757757

758758
@Override
759759
protected EncodedGraph lookupEncodedGraph(ResolvedJavaMethod method, BytecodeProvider intrinsicBytecodeProvider) {
760-
HostedMethod hostedMethod = (HostedMethod) method;
761-
CompilationGraph compilationGraph = hostedMethod.compilationInfo.getCompilationGraph();
762-
if (compilationGraph == null) {
763-
/*
764-
* We have compiled this method in a prior layer, but don't have the graph available
765-
* here.
766-
*/
767-
assert hostedMethod.isCompiledInPriorLayer() : method;
768-
return null;
769-
}
770-
return compilationGraph.getEncodedGraph();
760+
return ((HostedMethod) method).compilationInfo.getCompilationGraph().getEncodedGraph();
771761
}
772762

773763
@Override
@@ -855,6 +845,16 @@ private void doInlineTrivial(DebugContext debug, HostedMethod method) {
855845
}
856846

857847
private boolean makeInlineDecision(HostedMethod method, HostedMethod callee) {
848+
// GR-57832 this will be removed
849+
if (callee.compilationInfo.getCompilationGraph() == null) {
850+
/*
851+
* We have compiled this method in a prior layer, but don't have the graph available
852+
* here.
853+
*/
854+
assert callee.isCompiledInPriorLayer() : method;
855+
return false;
856+
}
857+
858858
if (universe.hostVM().neverInlineTrivial(method.getWrapped(), callee.getWrapped())) {
859859
return false;
860860
}

0 commit comments

Comments
 (0)