Search in sources :

Example 1 with ConfigKind

use of com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig.ConfigKind in project graal by oracle.

the class SharedRuntimeConfigurationBuilder method build.

public SharedRuntimeConfigurationBuilder build() {
    wordTypes = new WordTypes(metaAccess, FrameAccess.getWordKind());
    Providers p = createProviders(null, null, null, null, null, null, null, null);
    StampProvider stampProvider = createStampProvider(p);
    p = createProviders(null, null, null, null, null, null, stampProvider, null);
    ConstantReflectionProvider constantReflection = createConstantReflectionProvider(p);
    ConstantFieldProvider constantFieldProvider = createConstantFieldProvider(p);
    createProviders(null, constantReflection, constantFieldProvider, null, null, null, stampProvider, null);
    SnippetReflectionProvider snippetReflection = createSnippetReflectionProvider();
    createProviders(null, constantReflection, constantFieldProvider, null, null, null, stampProvider, snippetReflection);
    ForeignCallsProvider foreignCalls = createForeignCallsProvider();
    p = createProviders(null, constantReflection, constantFieldProvider, foreignCalls, null, null, stampProvider, snippetReflection);
    LoweringProvider lowerer = createLoweringProvider(p);
    p = createProviders(null, constantReflection, constantFieldProvider, foreignCalls, lowerer, null, stampProvider, snippetReflection);
    Replacements replacements = createReplacements(p, snippetReflection);
    p = createProviders(null, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, stampProvider, snippetReflection);
    EnumMap<ConfigKind, Backend> backends = new EnumMap<>(ConfigKind.class);
    for (ConfigKind config : ConfigKind.values()) {
        RegisterConfig registerConfig = new SubstrateAMD64RegisterConfig(config, metaAccess, ConfigurationValues.getTarget());
        CodeCacheProvider codeCacheProvider = createCodeCacheProvider(registerConfig);
        Providers newProviders = createProviders(codeCacheProvider, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, stampProvider, snippetReflection);
        backends.put(config, GraalConfiguration.instance().createBackend(newProviders));
    }
    runtimeConfig = new RuntimeConfiguration(p, snippetReflection, backends, wordTypes);
    return this;
}
Also used : ForeignCallsProvider(org.graalvm.compiler.core.common.spi.ForeignCallsProvider) SubstrateForeignCallsProvider(com.oracle.svm.core.graal.meta.SubstrateForeignCallsProvider) SubstrateStampProvider(com.oracle.svm.core.graal.meta.SubstrateStampProvider) StampProvider(org.graalvm.compiler.nodes.spi.StampProvider) RegisterConfig(jdk.vm.ci.code.RegisterConfig) SubstrateAMD64RegisterConfig(com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig) Replacements(org.graalvm.compiler.nodes.spi.Replacements) WordTypes(org.graalvm.compiler.word.WordTypes) SubstrateAMD64RegisterConfig(com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig) LoweringProvider(org.graalvm.compiler.nodes.spi.LoweringProvider) SubstrateLoweringProvider(com.oracle.svm.core.graal.meta.SubstrateLoweringProvider) ConfigKind(com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig.ConfigKind) Providers(org.graalvm.compiler.phases.util.Providers) SubstrateCodeCacheProvider(com.oracle.svm.core.graal.meta.SubstrateCodeCacheProvider) CodeCacheProvider(jdk.vm.ci.code.CodeCacheProvider) RuntimeConfiguration(com.oracle.svm.core.graal.meta.RuntimeConfiguration) SubstrateSnippetReflectionProvider(com.oracle.svm.core.graal.meta.SubstrateSnippetReflectionProvider) SnippetReflectionProvider(org.graalvm.compiler.api.replacements.SnippetReflectionProvider) Backend(org.graalvm.compiler.core.target.Backend) ConstantReflectionProvider(jdk.vm.ci.meta.ConstantReflectionProvider) EnumMap(java.util.EnumMap) ConstantFieldProvider(org.graalvm.compiler.core.common.spi.ConstantFieldProvider)

Aggregations

SubstrateAMD64RegisterConfig (com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig)1 ConfigKind (com.oracle.svm.core.graal.code.amd64.SubstrateAMD64RegisterConfig.ConfigKind)1 RuntimeConfiguration (com.oracle.svm.core.graal.meta.RuntimeConfiguration)1 SubstrateCodeCacheProvider (com.oracle.svm.core.graal.meta.SubstrateCodeCacheProvider)1 SubstrateForeignCallsProvider (com.oracle.svm.core.graal.meta.SubstrateForeignCallsProvider)1 SubstrateLoweringProvider (com.oracle.svm.core.graal.meta.SubstrateLoweringProvider)1 SubstrateSnippetReflectionProvider (com.oracle.svm.core.graal.meta.SubstrateSnippetReflectionProvider)1 SubstrateStampProvider (com.oracle.svm.core.graal.meta.SubstrateStampProvider)1 EnumMap (java.util.EnumMap)1 CodeCacheProvider (jdk.vm.ci.code.CodeCacheProvider)1 RegisterConfig (jdk.vm.ci.code.RegisterConfig)1 ConstantReflectionProvider (jdk.vm.ci.meta.ConstantReflectionProvider)1 SnippetReflectionProvider (org.graalvm.compiler.api.replacements.SnippetReflectionProvider)1 ConstantFieldProvider (org.graalvm.compiler.core.common.spi.ConstantFieldProvider)1 ForeignCallsProvider (org.graalvm.compiler.core.common.spi.ForeignCallsProvider)1 Backend (org.graalvm.compiler.core.target.Backend)1 LoweringProvider (org.graalvm.compiler.nodes.spi.LoweringProvider)1 Replacements (org.graalvm.compiler.nodes.spi.Replacements)1 StampProvider (org.graalvm.compiler.nodes.spi.StampProvider)1 Providers (org.graalvm.compiler.phases.util.Providers)1