FloatingAccessNode.java revision 12657:6ef01bd40ce2
10SN/A/*
26073SN/A * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
30SN/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
40SN/A *
50SN/A * This code is free software; you can redistribute it and/or modify it
60SN/A * under the terms of the GNU General Public License version 2 only, as
72362SN/A * published by the Free Software Foundation.
80SN/A *
92362SN/A * This code is distributed in the hope that it will be useful, but WITHOUT
100SN/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
110SN/A * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
120SN/A * version 2 for more details (a copy is included in the LICENSE file that
130SN/A * accompanied this code).
140SN/A *
150SN/A * You should have received a copy of the GNU General Public License version
160SN/A * 2 along with this work; if not, write to the Free Software Foundation,
170SN/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
180SN/A *
190SN/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
200SN/A * or visit www.oracle.com if you need additional information or have any
212362SN/A * questions.
222362SN/A */
232362SN/Apackage org.graalvm.compiler.nodes.memory;
240SN/A
250SN/Aimport org.graalvm.compiler.core.common.LocationIdentity;
264457SN/Aimport org.graalvm.compiler.core.common.type.Stamp;
274457SN/Aimport org.graalvm.compiler.graph.NodeClass;
284457SN/Aimport org.graalvm.compiler.nodeinfo.InputType;
294457SN/Aimport org.graalvm.compiler.nodeinfo.NodeInfo;
304457SN/Aimport org.graalvm.compiler.nodes.FloatingGuardedNode;
314457SN/Aimport org.graalvm.compiler.nodes.extended.GuardingNode;
324457SN/Aimport org.graalvm.compiler.nodes.memory.address.AddressNode;
334457SN/A
344457SN/A@NodeInfo
350SN/Apublic abstract class FloatingAccessNode extends FloatingGuardedNode implements Access, MemoryAccess {
360SN/A    public static final NodeClass<FloatingAccessNode> TYPE = NodeClass.create(FloatingAccessNode.class);
370SN/A
380SN/A    @Input(InputType.Association) AddressNode address;
390SN/A    protected final LocationIdentity location;
400SN/A
410SN/A    protected BarrierType barrierType;
420SN/A
430SN/A    protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, AddressNode address, LocationIdentity location, Stamp stamp) {
440SN/A        super(c, stamp);
450SN/A        this.address = address;
460SN/A        this.location = location;
4728SN/A    }
480SN/A
490SN/A    protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, AddressNode address, LocationIdentity location, Stamp stamp, GuardingNode guard, BarrierType barrierType) {
500SN/A        super(c, stamp, guard);
510SN/A        this.address = address;
520SN/A        this.location = location;
530SN/A        this.barrierType = barrierType;
540SN/A    }
550SN/A
560SN/A    @Override
570SN/A    public AddressNode getAddress() {
580SN/A        return address;
590SN/A    }
600SN/A
610SN/A    @Override
620SN/A    public LocationIdentity getLocationIdentity() {
630SN/A        return location;
6428SN/A    }
6528SN/A
660SN/A    @Override
670SN/A    public BarrierType getBarrierType() {
680SN/A        return barrierType;
690SN/A    }
700SN/A
710SN/A    @Override
720SN/A    public boolean canNullCheck() {
730SN/A        return true;
740SN/A    }
750SN/A
760SN/A    public abstract FixedAccessNode asFixedNode();
770SN/A}
780SN/A