Search in sources :

Example 1 with CacheEntry

use of org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.CacheEntry in project graal by oracle.

the class ReadEliminationClosure method processLoopExit.

@Override
protected void processLoopExit(LoopExitNode exitNode, ReadEliminationBlockState initialState, ReadEliminationBlockState exitState, GraphEffectList effects) {
    if (exitNode.graph().hasValueProxies()) {
        MapCursor<CacheEntry<?>, ValueNode> entry = exitState.getReadCache().getEntries();
        while (entry.advance()) {
            if (initialState.getReadCache().get(entry.getKey()) != entry.getValue()) {
                ProxyNode proxy = new ValueProxyNode(exitState.getCacheEntry(entry.getKey()), exitNode);
                effects.addFloatingNode(proxy, "readCacheProxy");
                exitState.getReadCache().put(entry.getKey(), proxy);
            }
        }
    }
}
Also used : ValueProxyNode(org.graalvm.compiler.nodes.ValueProxyNode) ProxyNode(org.graalvm.compiler.nodes.ProxyNode) ValueProxyNode(org.graalvm.compiler.nodes.ValueProxyNode) ValueNode(org.graalvm.compiler.nodes.ValueNode) LoadCacheEntry(org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.LoadCacheEntry) CacheEntry(org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.CacheEntry) UnsafeLoadCacheEntry(org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.UnsafeLoadCacheEntry)

Aggregations

ProxyNode (org.graalvm.compiler.nodes.ProxyNode)1 ValueNode (org.graalvm.compiler.nodes.ValueNode)1 ValueProxyNode (org.graalvm.compiler.nodes.ValueProxyNode)1 CacheEntry (org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.CacheEntry)1 LoadCacheEntry (org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.LoadCacheEntry)1 UnsafeLoadCacheEntry (org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.UnsafeLoadCacheEntry)1