# HG changeset patch # User Josef Eisl # Date 1434719944 -7200 # Node ID 0c03d2fbd25a4d5d13cac0e220e85763086d6563 # Parent 74228b139cfc1eae65f49d8c02c8e65e02db6db6 Pass a DefaultSuitesProvider to HotSpotSuitesProvider. diff -r 74228b139cfc -r 0c03d2fbd25a graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java --- 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 diff -r 74228b139cfc -r 0c03d2fbd25a graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java --- 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) { diff -r 74228b139cfc -r 0c03d2fbd25a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java --- 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 { @@ -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 createGraphBuilderSuite(Plugins plugins) { - PhaseSuite suite = new PhaseSuite<>(); - GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins); - suite.appendPhase(new GraphBuilderPhase(config)); + protected PhaseSuite createGraphBuilderSuite() { + PhaseSuite 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)); diff -r 74228b139cfc -r 0c03d2fbd25a graal/com.oracle.graal.java/src/com/oracle/graal/java/DefaultSuitesProvider.java --- 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 createGraphBuilderSuite(Plugins plugins) { + public PhaseSuite createGraphBuilderSuite(Plugins plugins) { PhaseSuite suite = new PhaseSuite<>(); suite.appendPhase(new GraphBuilderPhase(GraphBuilderConfiguration.getDefault(plugins))); return suite;