use of org.graalvm.compiler.truffle.compiler.debug.HistogramInlineInvokePlugin in project graal by oracle.
the class PartialEvaluator method doGraphPE.
protected void doGraphPE(CompilableTruffleAST compilable, StructuredGraph graph, HighTierContext tierContext, TruffleInliningPlan inliningDecision) {
LoopExplosionPlugin loopExplosionPlugin = new PELoopExplosionPlugin();
ParameterPlugin parameterPlugin = new InterceptReceiverPlugin(compilable);
ReplacementsImpl replacements = (ReplacementsImpl) providers.getReplacements();
InlineInvokePlugin[] inlineInvokePlugins;
InlineInvokePlugin inlineInvokePlugin = new PEInlineInvokePlugin(inliningDecision);
HistogramInlineInvokePlugin histogramPlugin = null;
if (TruffleCompilerOptions.getValue(PrintTruffleExpansionHistogram)) {
histogramPlugin = new HistogramInlineInvokePlugin(graph);
inlineInvokePlugins = new InlineInvokePlugin[] { replacements, inlineInvokePlugin, histogramPlugin };
} else {
inlineInvokePlugins = new InlineInvokePlugin[] { replacements, inlineInvokePlugin };
}
SourceLanguagePositionProvider sourceLanguagePosition = new TruffleSourceLanguagePositionProvider(inliningDecision);
PEGraphDecoder decoder = createGraphDecoder(graph, tierContext, loopExplosionPlugin, decodingInvocationPlugins, inlineInvokePlugins, parameterPlugin, nodePlugins, callInlinedMethod, sourceLanguagePosition);
decoder.decode(graph.method(), graph.trackNodeSourcePosition());
if (TruffleCompilerOptions.getValue(PrintTruffleExpansionHistogram)) {
histogramPlugin.print(compilable);
}
}
Aggregations