Search in sources :

Example 1 with CInterfaceWriteNode

use of com.oracle.svm.core.graal.nodes.CInterfaceWriteNode in project graal by oracle.

the class StoreVMThreadLocalNode method lower.

@Override
public void lower(LoweringTool tool) {
    assert threadLocalInfo.offset >= 0;
    ConstantNode offset = ConstantNode.forIntegerKind(FrameAccess.getWordKind(), threadLocalInfo.offset, graph());
    AddressNode address = graph().unique(new OffsetAddressNode(holder, offset));
    AbstractWriteNode write;
    if (SubstrateOptions.MultiThreaded.getValue()) {
        write = new CInterfaceWriteNode(address, threadLocalInfo.locationIdentity, value, barrierType, threadLocalInfo.name);
    } else {
        write = new JavaWriteNode(threadLocalInfo.storageKind, address, threadLocalInfo.locationIdentity, value, barrierType, true);
    }
    write = graph().add(write);
    write.setStateAfter(stateAfter());
    graph().replaceFixedWithFixed(this, write);
    if (!SubstrateOptions.MultiThreaded.getValue()) {
        tool.getLowerer().lower(write, tool);
    }
}
Also used : ConstantNode(org.graalvm.compiler.nodes.ConstantNode) OffsetAddressNode(org.graalvm.compiler.nodes.memory.address.OffsetAddressNode) JavaWriteNode(org.graalvm.compiler.nodes.extended.JavaWriteNode) AddressNode(org.graalvm.compiler.nodes.memory.address.AddressNode) OffsetAddressNode(org.graalvm.compiler.nodes.memory.address.OffsetAddressNode) AbstractWriteNode(org.graalvm.compiler.nodes.memory.AbstractWriteNode) CInterfaceWriteNode(com.oracle.svm.core.graal.nodes.CInterfaceWriteNode)

Aggregations

CInterfaceWriteNode (com.oracle.svm.core.graal.nodes.CInterfaceWriteNode)1 ConstantNode (org.graalvm.compiler.nodes.ConstantNode)1 JavaWriteNode (org.graalvm.compiler.nodes.extended.JavaWriteNode)1 AbstractWriteNode (org.graalvm.compiler.nodes.memory.AbstractWriteNode)1 AddressNode (org.graalvm.compiler.nodes.memory.address.AddressNode)1 OffsetAddressNode (org.graalvm.compiler.nodes.memory.address.OffsetAddressNode)1