use of org.graalvm.compiler.nodes.extended.RawLoadNode in project graal by oracle.
the class UnsafeEATest method canonicalizeGraph.
@Override
protected void canonicalizeGraph() {
if (testingUnsafe) {
// transformation into field access nodes.
for (Node node : graph.getNodes().filter(x -> x instanceof UnsafeAccessNode).snapshot()) {
if (node instanceof RawStoreNode) {
RawStoreNode store = (RawStoreNode) node;
RawStoreNode newStore = graph.add(new RawStoreNode(store.object(), store.offset(), store.value(), store.accessKind(), NamedLocationIdentity.any(), store.needsBarrier(), store.stateAfter(), true));
graph.replaceFixedWithFixed(store, newStore);
} else if (node instanceof RawLoadNode) {
RawLoadNode load = (RawLoadNode) node;
RawLoadNode newLoad = graph.add(new RawLoadNode(load.object(), load.offset(), load.accessKind(), NamedLocationIdentity.any(), true));
graph.replaceFixedWithFixed(load, newLoad);
}
}
}
super.canonicalizeGraph();
}
Aggregations