Skip to content

Commit

Permalink
Avoid getHostBackend when instantiating UnimplementedGraalIntrinsics.
Browse files Browse the repository at this point in the history
  • Loading branch information
mur47x111 committed Aug 5, 2024
1 parent 2847a7c commit e037274
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static Plugins create(HotSpotGraalRuntimeProvider graalRuntime,
OptionValues options,
TargetDescription target,
BarrierSet barrierSet) {
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options);
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options, target);

Plugins plugins = new Plugins(invocationPlugins);
plugins.appendNodePlugin(new HotSpotExceptionDispatchPlugin(config, wordTypes.getWordKind()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
package jdk.graal.compiler.hotspot.meta;

import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
import static jdk.graal.compiler.hotspot.HotSpotGraalServices.isIntrinsicAvailable;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;

import java.lang.reflect.Type;
import java.util.ArrayList;
Expand All @@ -37,6 +37,7 @@
import org.graalvm.collections.EconomicSet;
import org.graalvm.collections.MapCursor;
import org.graalvm.collections.Pair;

import jdk.graal.compiler.debug.GraalError;
import jdk.graal.compiler.debug.TTY;
import jdk.graal.compiler.graph.Node;
Expand All @@ -49,7 +50,7 @@
import jdk.graal.compiler.options.OptionValues;
import jdk.graal.compiler.phases.tiers.CompilerConfiguration;
import jdk.graal.compiler.replacements.nodes.MacroInvokable;

import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
Expand All @@ -73,11 +74,11 @@ record MethodKey(String name, String descriptor) {

private final EconomicMap<String, EconomicSet<MethodKey>> disabledIntrinsics = EconomicMap.create();

HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options) {
HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options, TargetDescription target) {
this.graalRuntime = graalRuntime;
this.config = config;
if (Options.WarnMissingIntrinsic.getValue(options)) {
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(graalRuntime.getTarget().arch);
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(target.arch);
} else {
this.unimplementedIntrinsics = null;
}
Expand Down

0 comments on commit e037274

Please sign in to comment.