Search in sources :

Example 1 with StoreVMThreadLocalNode

use of com.oracle.svm.core.graal.thread.StoreVMThreadLocalNode in project graal by oracle.

the class VMThreadSTFeature method handleSet.

private boolean handleSet(GraphBuilderContext b, Receiver receiver, ValueNode valueNode) {
    VMThreadLocalInfo info = threadLocalCollector.findInfo(b, receiver.get());
    VMThreadLocalSTHolderNode holder = b.add(new VMThreadLocalSTHolderNode(info));
    b.add(new StoreVMThreadLocalNode(info, holder, valueNode, BarrierType.PRECISE));
    return true;
}
Also used : StoreVMThreadLocalNode(com.oracle.svm.core.graal.thread.StoreVMThreadLocalNode) VMThreadLocalSTHolderNode(com.oracle.svm.core.graal.thread.VMThreadLocalSTHolderNode) VMThreadLocalInfo(com.oracle.svm.core.threadlocal.VMThreadLocalInfo)

Example 2 with StoreVMThreadLocalNode

use of com.oracle.svm.core.graal.thread.StoreVMThreadLocalNode in project graal by oracle.

the class VMThreadMTFeature method handleSet.

private boolean handleSet(GraphBuilderContext b, Receiver receiver, ValueNode threadNode, ValueNode valueNode, boolean isVolatile) {
    VMThreadLocalInfo threadLocalInfo = threadLocalCollector.findInfo(b, receiver.get());
    if (isVolatile) {
        b.add(new MembarNode(MemoryBarriers.JMM_PRE_VOLATILE_WRITE));
    }
    b.add(new StoreVMThreadLocalNode(threadLocalInfo, threadNode, valueNode, BarrierType.NONE));
    if (isVolatile) {
        b.add(new MembarNode(MemoryBarriers.JMM_POST_VOLATILE_WRITE));
    }
    return true;
}
Also used : StoreVMThreadLocalNode(com.oracle.svm.core.graal.thread.StoreVMThreadLocalNode) MembarNode(org.graalvm.compiler.nodes.extended.MembarNode) VMThreadLocalInfo(com.oracle.svm.core.threadlocal.VMThreadLocalInfo)

Aggregations

StoreVMThreadLocalNode (com.oracle.svm.core.graal.thread.StoreVMThreadLocalNode)2 VMThreadLocalInfo (com.oracle.svm.core.threadlocal.VMThreadLocalInfo)2 VMThreadLocalSTHolderNode (com.oracle.svm.core.graal.thread.VMThreadLocalSTHolderNode)1 MembarNode (org.graalvm.compiler.nodes.extended.MembarNode)1