Search in sources :

Example 1 with SubstrateTruffleCompilerImpl

use of com.oracle.svm.truffle.api.SubstrateTruffleCompilerImpl in project graal by oracle.

the class TruffleSupport method createSubstrateTruffleCompilerImpl.

protected static SubstrateTruffleCompiler createSubstrateTruffleCompilerImpl(SubstrateTruffleRuntime runtime, String compilerConfigurationName) {
    GraalFeature graalFeature = ImageSingletons.lookup(GraalFeature.class);
    SnippetReflectionProvider snippetReflectionProvider = graalFeature.getHostedProviders().getSnippetReflection();
    final GraphBuilderConfiguration.Plugins graphBuilderPlugins = graalFeature.getHostedProviders().getGraphBuilderPlugins();
    final TruffleTierConfiguration firstTier = new TruffleTierConfiguration(new EconomyPartialEvaluatorConfiguration(), GraalSupport.getRuntimeConfig().getBackendForNormalMethod(), GraalSupport.getFirstTierProviders(), GraalSupport.getFirstTierSuites(), GraalSupport.getFirstTierLirSuites());
    PartialEvaluatorConfiguration peConfig = TruffleCompilerImpl.createPartialEvaluatorConfiguration(compilerConfigurationName);
    final TruffleTierConfiguration lastTier = new TruffleTierConfiguration(peConfig, GraalSupport.getRuntimeConfig().getBackendForNormalMethod(), GraalSupport.getRuntimeConfig().getProviders(), GraalSupport.getSuites(), GraalSupport.getLIRSuites());
    final TruffleCompilerConfiguration truffleCompilerConfig = new TruffleCompilerConfiguration(runtime, graphBuilderPlugins, snippetReflectionProvider, firstTier, lastTier);
    return new SubstrateTruffleCompilerImpl(truffleCompilerConfig);
}
Also used : SnippetReflectionProvider(org.graalvm.compiler.api.replacements.SnippetReflectionProvider) EconomyPartialEvaluatorConfiguration(org.graalvm.compiler.truffle.compiler.EconomyPartialEvaluatorConfiguration) PartialEvaluatorConfiguration(org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration) EconomyPartialEvaluatorConfiguration(org.graalvm.compiler.truffle.compiler.EconomyPartialEvaluatorConfiguration) TruffleTierConfiguration(org.graalvm.compiler.truffle.compiler.TruffleTierConfiguration) TruffleCompilerConfiguration(org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration) GraphBuilderConfiguration(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration) GraalFeature(com.oracle.svm.graal.hosted.GraalFeature) SubstrateTruffleCompilerImpl(com.oracle.svm.truffle.api.SubstrateTruffleCompilerImpl)

Aggregations

GraalFeature (com.oracle.svm.graal.hosted.GraalFeature)1 SubstrateTruffleCompilerImpl (com.oracle.svm.truffle.api.SubstrateTruffleCompilerImpl)1 SnippetReflectionProvider (org.graalvm.compiler.api.replacements.SnippetReflectionProvider)1 GraphBuilderConfiguration (org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration)1 EconomyPartialEvaluatorConfiguration (org.graalvm.compiler.truffle.compiler.EconomyPartialEvaluatorConfiguration)1 PartialEvaluatorConfiguration (org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration)1 TruffleCompilerConfiguration (org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration)1 TruffleTierConfiguration (org.graalvm.compiler.truffle.compiler.TruffleTierConfiguration)1