use of org.graalvm.compiler.nodes.memory.SideEffectFreeWrite in project graal by oracle.
the class DefaultJavaLoweringProvider method lowerJavaWriteNode.
protected void lowerJavaWriteNode(JavaWriteNode write) {
StructuredGraph graph = write.graph();
ValueNode value = implicitStoreConvert(graph, write.getWriteKind(), write.value(), write.isCompressible());
WriteNode memoryWrite;
if (write.ordersMemoryAccesses()) {
memoryWrite = graph.add(new OrderedWriteNode(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType(), write.getMemoryOrder()));
} else if (write.hasSideEffect()) {
memoryWrite = graph.add(new WriteNode(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType()));
} else {
memoryWrite = graph.add(new SideEffectFreeWrite(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType()));
}
memoryWrite.setStateAfter(write.stateAfter());
graph.replaceFixedWithFixed(write, memoryWrite);
memoryWrite.setGuard(write.getGuard());
}
Aggregations