Mercurial > hg > graal-compiler
changeset 22047:0c03d2fbd25a
Pass a DefaultSuitesProvider to HotSpotSuitesProvider.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Fri, 19 Jun 2015 15:19:04 +0200 |
parents | 74228b139cfc |
children | a566bda0fb86 |
files | graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java graal/com.oracle.graal.java/src/com/oracle/graal/java/DefaultSuitesProvider.java |
diffstat | 4 files changed, 19 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java Mon Jun 22 10:07:38 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java Fri Jun 19 15:19:04 2015 +0200 @@ -31,6 +31,7 @@ import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hotspot.word.*; +import com.oracle.graal.java.*; import com.oracle.graal.phases.util.*; import com.oracle.graal.replacements.amd64.*; import com.oracle.jvmci.amd64.*; @@ -126,7 +127,8 @@ } protected HotSpotSuitesProvider createSuites(HotSpotGraalRuntimeProvider runtime, Plugins plugins, CodeCacheProvider codeCache, HotSpotRegistersProvider registers) { - return new HotSpotSuitesProvider(runtime, plugins, new AMD64HotSpotAddressLowering(codeCache, runtime.getConfig().getOopEncoding().base, registers.getHeapBaseRegister())); + return new HotSpotSuitesProvider(new DefaultSuitesProvider(plugins), runtime, new AMD64HotSpotAddressLowering(codeCache, runtime.getConfig().getOopEncoding().base, + registers.getHeapBaseRegister())); } protected HotSpotSnippetReflectionProvider createSnippetReflection(HotSpotGraalRuntimeProvider runtime) { @@ -164,15 +166,15 @@ } else { /* * System V Application Binary Interface, AMD64 Architecture Processor Supplement - * + * * Draft Version 0.96 - * + * * http://www.uclibc.org/docs/psABI-x86_64.pdf - * + * * 3.2.1 - * + * * ... - * + * * This subsection discusses usage of each register. Registers %rbp, %rbx and %r12 * through %r15 "belong" to the calling function and the called function is required to * preserve their values. In other words, a called function must preserve these
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Mon Jun 22 10:07:38 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java Fri Jun 19 15:19:04 2015 +0200 @@ -29,6 +29,7 @@ import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.hotspot.word.*; +import com.oracle.graal.java.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.phases.util.*; import com.oracle.graal.replacements.sparc.*; @@ -76,7 +77,7 @@ } protected HotSpotSuitesProvider createSuites(HotSpotGraalRuntimeProvider runtime, Plugins plugins, CodeCacheProvider codeCache) { - return new HotSpotSuitesProvider(runtime, plugins, new SPARCAddressLowering(codeCache)); + return new HotSpotSuitesProvider(new DefaultSuitesProvider(plugins), runtime, new SPARCAddressLowering(codeCache)); } protected SPARCHotSpotBackend createBackend(HotSpotGraalRuntimeProvider runtime, HotSpotProviders providers) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java Mon Jun 22 10:07:38 2015 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java Fri Jun 19 15:19:04 2015 +0200 @@ -26,7 +26,6 @@ import com.oracle.graal.graphbuilderconf.*; import com.oracle.graal.graphbuilderconf.GraphBuilderConfiguration.DebugInfoMode; -import com.oracle.graal.graphbuilderconf.GraphBuilderConfiguration.Plugins; import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.phases.*; import com.oracle.graal.java.*; @@ -52,6 +51,7 @@ protected final HotSpotGraalRuntimeProvider runtime; private final AddressLowering addressLowering; + private final DefaultSuitesProvider defaultSuitesProvider; private class SuitesSupplier implements OptionSupplier<Suites> { @@ -73,10 +73,11 @@ } - public HotSpotSuitesProvider(HotSpotGraalRuntimeProvider runtime, Plugins plugins, AddressLowering addressLowering) { + public HotSpotSuitesProvider(DefaultSuitesProvider defaultSuitesProvider, HotSpotGraalRuntimeProvider runtime, AddressLowering addressLowering) { this.runtime = runtime; this.addressLowering = addressLowering; - this.defaultGraphBuilderSuite = createGraphBuilderSuite(plugins); + this.defaultSuitesProvider = defaultSuitesProvider; + this.defaultGraphBuilderSuite = createGraphBuilderSuite(); this.defaultSuites = new DerivedOptionValue<>(new SuitesSupplier()); this.defaultLIRSuites = new DerivedOptionValue<>(new LIRSuitesSupplier()); } @@ -90,7 +91,7 @@ } public Suites createSuites() { - Suites ret = Suites.createDefaultSuites(); + Suites ret = defaultSuitesProvider.createSuites(); if (ImmutableCode.getValue()) { // lowering introduces class constants, therefore it must be after lowering @@ -110,10 +111,8 @@ return ret; } - protected PhaseSuite<HighTierContext> createGraphBuilderSuite(Plugins plugins) { - PhaseSuite<HighTierContext> suite = new PhaseSuite<>(); - GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins); - suite.appendPhase(new GraphBuilderPhase(config)); + protected PhaseSuite<HighTierContext> createGraphBuilderSuite() { + PhaseSuite<HighTierContext> suite = defaultSuitesProvider.getDefaultGraphBuilderSuite().copy(); assert appendGraphEncoderTest(suite); return suite; } @@ -166,7 +165,7 @@ } public LIRSuites createLIRSuites() { - LIRSuites suites = Suites.createDefaultLIRSuites(); + LIRSuites suites = defaultSuitesProvider.createLIRSuites(); String profileInstructions = HotSpotBackend.Options.ASMInstructionProfiling.getValue(); if (profileInstructions != null) { suites.getPostAllocationOptimizationStage().appendPhase(new HotSpotInstructionProfiling(profileInstructions));
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/DefaultSuitesProvider.java Mon Jun 22 10:07:38 2015 +0200 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/DefaultSuitesProvider.java Fri Jun 19 15:19:04 2015 +0200 @@ -74,7 +74,7 @@ return defaultGraphBuilderSuite; } - protected PhaseSuite<HighTierContext> createGraphBuilderSuite(Plugins plugins) { + public PhaseSuite<HighTierContext> createGraphBuilderSuite(Plugins plugins) { PhaseSuite<HighTierContext> suite = new PhaseSuite<>(); suite.appendPhase(new GraphBuilderPhase(GraphBuilderConfiguration.getDefault(plugins))); return suite;