src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java
changeset 58299 6df94ce3ab2f
parent 55509 d58442b8abc1
child 58679 9c3209ff7550
child 58877 aec7bf35d6f5
equal deleted inserted replaced
58298:0152ad7b38b8 58299:6df94ce3ab2f
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   103         HotSpotGCProvider gc = createGCProvider(config);
   103         HotSpotGCProvider gc = createGCProvider(config);
   104         Providers p = new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, null, stampProvider, gc);
   104         Providers p = new Providers(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, null, stampProvider, gc);
   105         HotSpotSnippetReflectionProvider snippetReflection = createSnippetReflection(runtime, constantReflection, wordTypes);
   105         HotSpotSnippetReflectionProvider snippetReflection = createSnippetReflection(runtime, constantReflection, wordTypes);
   106         BytecodeProvider bytecodeProvider = createBytecodeProvider(metaAccess, snippetReflection);
   106         BytecodeProvider bytecodeProvider = createBytecodeProvider(metaAccess, snippetReflection);
   107         HotSpotReplacementsImpl replacements = createReplacements(target, p, snippetReflection, bytecodeProvider);
   107         HotSpotReplacementsImpl replacements = createReplacements(target, p, snippetReflection, bytecodeProvider);
   108         Plugins plugins = createGraphBuilderPlugins(compilerConfiguration, config, metaAccess, constantReflection, foreignCalls, snippetReflection, replacements, wordTypes, runtime.getOptions());
   108         Plugins plugins = createGraphBuilderPlugins(runtime, compilerConfiguration, config, metaAccess, constantReflection, foreignCalls, snippetReflection, replacements, wordTypes,
       
   109                         runtime.getOptions());
   109         replacements.setGraphBuilderPlugins(plugins);
   110         replacements.setGraphBuilderPlugins(plugins);
   110         HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins, replacements);
   111         HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins, replacements);
   111         HotSpotProviders providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, suites, registers,
   112         HotSpotProviders providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, suites, registers,
   112                         snippetReflection, wordTypes, plugins, gc);
   113                         snippetReflection, wordTypes, plugins, gc);
   113         replacements.setProviders(providers);
   114         replacements.setProviders(providers);
   114 
   115 
   115         return createBackend(config, runtime, providers);
   116         return createBackend(config, runtime, providers);
   116     }
   117     }
   117 
   118 
   118     protected Plugins createGraphBuilderPlugins(CompilerConfiguration compilerConfiguration, GraalHotSpotVMConfig config, HotSpotMetaAccessProvider metaAccess,
   119     protected Plugins createGraphBuilderPlugins(HotSpotGraalRuntimeProvider graalRuntime,
   119                     HotSpotConstantReflectionProvider constantReflection, HotSpotForeignCallsProvider foreignCalls,
   120                     CompilerConfiguration compilerConfiguration,
   120                     HotSpotSnippetReflectionProvider snippetReflection, HotSpotReplacementsImpl replacements, HotSpotWordTypes wordTypes, OptionValues options) {
   121                     GraalHotSpotVMConfig config,
   121         Plugins plugins = HotSpotGraphBuilderPlugins.create(compilerConfiguration, config, wordTypes, metaAccess, constantReflection, snippetReflection, foreignCalls, replacements, options);
   122                     HotSpotMetaAccessProvider metaAccess,
       
   123                     HotSpotConstantReflectionProvider constantReflection,
       
   124                     HotSpotForeignCallsProvider foreignCalls,
       
   125                     HotSpotSnippetReflectionProvider snippetReflection,
       
   126                     HotSpotReplacementsImpl replacements,
       
   127                     HotSpotWordTypes wordTypes,
       
   128                     OptionValues options) {
       
   129         Plugins plugins = HotSpotGraphBuilderPlugins.create(
       
   130                         graalRuntime,
       
   131                         compilerConfiguration,
       
   132                         config,
       
   133                         wordTypes,
       
   134                         metaAccess,
       
   135                         constantReflection,
       
   136                         snippetReflection,
       
   137                         foreignCalls,
       
   138                         replacements,
       
   139                         options);
   122         SPARCGraphBuilderPlugins.register(plugins, replacements.getDefaultReplacementBytecodeProvider(), false);
   140         SPARCGraphBuilderPlugins.register(plugins, replacements.getDefaultReplacementBytecodeProvider(), false);
   123         return plugins;
   141         return plugins;
   124     }
   142     }
   125 
   143 
   126     /**
   144     /**