< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/RawLoadNode.java

Print this page




  62 
  63     /**
  64      * This constructor exists for node intrinsics that need a stamp based on {@code accessKind}.
  65      */
  66     public RawLoadNode(ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity) {
  67         this(object, offset, accessKind, locationIdentity, false);
  68     }
  69 
  70     public RawLoadNode(ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity, boolean forceAnyLocation) {
  71         super(TYPE, StampFactory.forKind(accessKind.getStackKind()), object, offset, accessKind, locationIdentity, forceAnyLocation);
  72     }
  73 
  74     /**
  75      * This constructor exists for node intrinsics that need a stamp based on the return type of the
  76      * {@link org.graalvm.compiler.graph.Node.NodeIntrinsic} annotated method.
  77      */
  78     public RawLoadNode(@InjectedNodeParameter Stamp stamp, ValueNode object, ValueNode offset, LocationIdentity locationIdentity, JavaKind accessKind) {
  79         super(TYPE, stamp, object, offset, accessKind, locationIdentity, false);
  80     }
  81 
  82     public RawLoadNode(NodeClass<? extends RawLoadNode> c, ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity) {
  83         super(c, StampFactory.forKind(accessKind.getStackKind()), object, offset, accessKind, locationIdentity, false);
  84     }
  85 
  86     @Override
  87     public void lower(LoweringTool tool) {
  88         tool.getLowerer().lower(this, tool);
  89     }
  90 
  91     @Override
  92     public void virtualize(VirtualizerTool tool) {
  93         ValueNode alias = tool.getAlias(object());
  94         if (alias instanceof VirtualObjectNode) {
  95             VirtualObjectNode virtual = (VirtualObjectNode) alias;
  96             ValueNode offsetValue = tool.getAlias(offset());
  97             if (offsetValue.isConstant()) {
  98                 long off = offsetValue.asJavaConstant().asLong();
  99                 int entryIndex = virtual.entryIndexForOffset(off, accessKind());
 100 
 101                 if (entryIndex != -1) {
 102                     ValueNode entry = tool.getEntry(virtual, entryIndex);




  62 
  63     /**
  64      * This constructor exists for node intrinsics that need a stamp based on {@code accessKind}.
  65      */
  66     public RawLoadNode(ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity) {
  67         this(object, offset, accessKind, locationIdentity, false);
  68     }
  69 
  70     public RawLoadNode(ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity, boolean forceAnyLocation) {
  71         super(TYPE, StampFactory.forKind(accessKind.getStackKind()), object, offset, accessKind, locationIdentity, forceAnyLocation);
  72     }
  73 
  74     /**
  75      * This constructor exists for node intrinsics that need a stamp based on the return type of the
  76      * {@link org.graalvm.compiler.graph.Node.NodeIntrinsic} annotated method.
  77      */
  78     public RawLoadNode(@InjectedNodeParameter Stamp stamp, ValueNode object, ValueNode offset, LocationIdentity locationIdentity, JavaKind accessKind) {
  79         super(TYPE, stamp, object, offset, accessKind, locationIdentity, false);
  80     }
  81 
  82     protected RawLoadNode(NodeClass<? extends RawLoadNode> c, ValueNode object, ValueNode offset, JavaKind accessKind, LocationIdentity locationIdentity) {
  83         super(c, StampFactory.forKind(accessKind.getStackKind()), object, offset, accessKind, locationIdentity, false);
  84     }
  85 
  86     @Override
  87     public void lower(LoweringTool tool) {
  88         tool.getLowerer().lower(this, tool);
  89     }
  90 
  91     @Override
  92     public void virtualize(VirtualizerTool tool) {
  93         ValueNode alias = tool.getAlias(object());
  94         if (alias instanceof VirtualObjectNode) {
  95             VirtualObjectNode virtual = (VirtualObjectNode) alias;
  96             ValueNode offsetValue = tool.getAlias(offset());
  97             if (offsetValue.isConstant()) {
  98                 long off = offsetValue.asJavaConstant().asLong();
  99                 int entryIndex = virtual.entryIndexForOffset(off, accessKind());
 100 
 101                 if (entryIndex != -1) {
 102                     ValueNode entry = tool.getEntry(virtual, entryIndex);


< prev index next >