< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/LoadHubNode.java
Print this page
rev 56282 : [mq]: graal
*** 1,7 ****
/*
! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 26,35 ****
--- 26,36 ----
import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
+ import org.graalvm.compiler.core.common.type.AbstractPointerStamp;
import org.graalvm.compiler.core.common.type.ObjectStamp;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.core.common.type.TypeReference;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.spi.Canonicalizable;
*** 60,76 ****
public ValueNode getValue() {
return value;
}
! private static Stamp hubStamp(StampProvider stampProvider, ValueNode value) {
assert value.stamp(NodeView.DEFAULT) instanceof ObjectStamp;
return stampProvider.createHubStamp(((ObjectStamp) value.stamp(NodeView.DEFAULT)));
}
public static ValueNode create(ValueNode value, StampProvider stampProvider, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) {
! Stamp stamp = hubStamp(stampProvider, value);
ValueNode synonym = findSynonym(value, stamp, metaAccess, constantReflection);
if (synonym != null) {
return synonym;
}
return new LoadHubNode(stamp, value);
--- 61,81 ----
public ValueNode getValue() {
return value;
}
! private static AbstractPointerStamp hubStamp(StampProvider stampProvider, ValueNode value) {
assert value.stamp(NodeView.DEFAULT) instanceof ObjectStamp;
return stampProvider.createHubStamp(((ObjectStamp) value.stamp(NodeView.DEFAULT)));
}
public static ValueNode create(ValueNode value, StampProvider stampProvider, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) {
! final AbstractPointerStamp stamp = hubStamp(stampProvider, value);
! return create(value, stamp, metaAccess, constantReflection);
! }
!
! public static ValueNode create(ValueNode value, AbstractPointerStamp stamp, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) {
ValueNode synonym = findSynonym(value, stamp, metaAccess, constantReflection);
if (synonym != null) {
return synonym;
}
return new LoadHubNode(stamp, value);
< prev index next >