use of org.graalvm.compiler.truffle.compiler.phases.VerifyFrameDoesNotEscapePhase in project graal by oracle.
the class PartialEvaluator method createGraph.
@SuppressWarnings("try")
public StructuredGraph createGraph(DebugContext debug, final CompilableTruffleAST compilable, TruffleInliningPlan inliningPlan, AllowAssumptions allowAssumptions, CompilationIdentifier compilationId, SpeculationLog log, Cancellable cancellable) {
String name = compilable.toString();
OptionValues options = TruffleCompilerOptions.getOptions();
ResolvedJavaMethod rootMethod = rootForCallTarget(compilable);
// @formatter:off
final StructuredGraph graph = new StructuredGraph.Builder(options, debug, allowAssumptions).name(name).method(rootMethod).speculationLog(log).compilationId(compilationId).cancellable(cancellable).build();
try (DebugContext.Scope s = debug.scope("CreateGraph", graph);
Indent indent = debug.logAndIndent("createGraph %s", graph)) {
PhaseContext baseContext = new PhaseContext(providers);
HighTierContext tierContext = new HighTierContext(providers, new PhaseSuite<HighTierContext>(), OptimisticOptimizations.NONE);
fastPartialEvaluation(compilable, inliningPlan, graph, baseContext, tierContext);
if (cancellable != null && cancellable.isCancelled()) {
return null;
}
new VerifyFrameDoesNotEscapePhase().apply(graph, false);
postPartialEvaluation(graph);
} catch (Throwable e) {
throw debug.handle(e);
}
return graph;
}
Aggregations