Search in sources :

Example 1 with LoopExplosionPlugin

use of org.graalvm.compiler.nodes.graphbuilderconf.LoopExplosionPlugin 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);
    }
}
Also used : SourceLanguagePositionProvider(org.graalvm.compiler.graph.SourceLanguagePositionProvider) ParameterPlugin(org.graalvm.compiler.nodes.graphbuilderconf.ParameterPlugin) ReplacementsImpl(org.graalvm.compiler.replacements.ReplacementsImpl) LoopExplosionPlugin(org.graalvm.compiler.nodes.graphbuilderconf.LoopExplosionPlugin) CachingPEGraphDecoder(org.graalvm.compiler.replacements.CachingPEGraphDecoder) PEGraphDecoder(org.graalvm.compiler.replacements.PEGraphDecoder) HistogramInlineInvokePlugin(org.graalvm.compiler.truffle.compiler.debug.HistogramInlineInvokePlugin) InlineInvokePlugin(org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin) HistogramInlineInvokePlugin(org.graalvm.compiler.truffle.compiler.debug.HistogramInlineInvokePlugin)

Aggregations

SourceLanguagePositionProvider (org.graalvm.compiler.graph.SourceLanguagePositionProvider)1 InlineInvokePlugin (org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin)1 LoopExplosionPlugin (org.graalvm.compiler.nodes.graphbuilderconf.LoopExplosionPlugin)1 ParameterPlugin (org.graalvm.compiler.nodes.graphbuilderconf.ParameterPlugin)1 CachingPEGraphDecoder (org.graalvm.compiler.replacements.CachingPEGraphDecoder)1 PEGraphDecoder (org.graalvm.compiler.replacements.PEGraphDecoder)1 ReplacementsImpl (org.graalvm.compiler.replacements.ReplacementsImpl)1 HistogramInlineInvokePlugin (org.graalvm.compiler.truffle.compiler.debug.HistogramInlineInvokePlugin)1