Search in sources :

Example 1 with JVMCICompiler

use of jdk.vm.ci.runtime.JVMCICompiler in project graal by oracle.

the class Graal method initializeRuntime.

private static GraalRuntime initializeRuntime() {
    Services.initializeJVMCI();
    JVMCICompiler compiler = JVMCI.getRuntime().getCompiler();
    if (compiler instanceof GraalJVMCICompiler) {
        GraalJVMCICompiler graal = (GraalJVMCICompiler) compiler;
        return graal.getGraalRuntime();
    } else {
        return new InvalidGraalRuntime();
    }
}
Also used : GraalJVMCICompiler(org.graalvm.compiler.api.runtime.GraalJVMCICompiler) JVMCICompiler(jdk.vm.ci.runtime.JVMCICompiler) GraalJVMCICompiler(org.graalvm.compiler.api.runtime.GraalJVMCICompiler)

Example 2 with JVMCICompiler

use of jdk.vm.ci.runtime.JVMCICompiler in project graal by oracle.

the class HotSpotTruffleCompilerImpl method getCompiler.

private static GraalJVMCICompiler getCompiler(OptionValues options) {
    HotSpotJVMCIRuntime runtime = HotSpotJVMCIRuntime.runtime();
    if (!Options.TruffleCompilerConfiguration.hasBeenSet(options)) {
        JVMCICompiler compiler = runtime.getCompiler();
        if (compiler instanceof GraalJVMCICompiler) {
            return (GraalJVMCICompiler) compiler;
        }
    }
    CompilerConfigurationFactory compilerConfigurationFactory = CompilerConfigurationFactory.selectFactory(Options.TruffleCompilerConfiguration.getValue(options), options, runtime);
    return HotSpotGraalCompilerFactory.createCompiler("Truffle", runtime, options, compilerConfigurationFactory);
}
Also used : GraalJVMCICompiler(org.graalvm.compiler.api.runtime.GraalJVMCICompiler) CompilerConfigurationFactory(org.graalvm.compiler.hotspot.CompilerConfigurationFactory) EconomyCompilerConfigurationFactory(org.graalvm.compiler.hotspot.EconomyCompilerConfigurationFactory) HotSpotJVMCIRuntime(jdk.vm.ci.hotspot.HotSpotJVMCIRuntime) JVMCICompiler(jdk.vm.ci.runtime.JVMCICompiler) GraalJVMCICompiler(org.graalvm.compiler.api.runtime.GraalJVMCICompiler)

Aggregations

JVMCICompiler (jdk.vm.ci.runtime.JVMCICompiler)2 GraalJVMCICompiler (org.graalvm.compiler.api.runtime.GraalJVMCICompiler)2 HotSpotJVMCIRuntime (jdk.vm.ci.hotspot.HotSpotJVMCIRuntime)1 CompilerConfigurationFactory (org.graalvm.compiler.hotspot.CompilerConfigurationFactory)1 EconomyCompilerConfigurationFactory (org.graalvm.compiler.hotspot.EconomyCompilerConfigurationFactory)1