< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java

Print this page

        

*** 26,35 **** --- 26,36 ---- import static org.graalvm.word.LocationIdentity.any; import java.util.Iterator; import java.util.List; + import jdk.vm.ci.meta.ResolvedJavaType; import org.graalvm.compiler.core.common.cfg.Loop; import org.graalvm.compiler.core.common.type.Stamp; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.FieldLocationIdentity; import org.graalvm.compiler.nodes.FixedWithNextNode;
*** 50,59 **** --- 51,61 ---- import org.graalvm.compiler.nodes.java.LoadFieldNode; import org.graalvm.compiler.nodes.java.StoreFieldNode; import org.graalvm.compiler.nodes.memory.MemoryCheckpoint; import org.graalvm.compiler.nodes.memory.ReadNode; import org.graalvm.compiler.nodes.memory.WriteNode; + import org.graalvm.compiler.nodes.type.StampTool; import org.graalvm.compiler.nodes.util.GraphUtil; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.CacheEntry; import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.LoadCacheEntry; import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.UnsafeLoadCacheEntry;
*** 144,153 **** --- 146,157 ---- state.addCacheEntry(identifier, value); } else { processIdentity(state, write.getLocationIdentity()); } } else if (node instanceof UnsafeAccessNode) { + ResolvedJavaType type = StampTool.typeOrNull(((UnsafeAccessNode) node).object()); + if (type != null && !type.isArray()) { if (node instanceof RawLoadNode) { RawLoadNode load = (RawLoadNode) node; if (load.getLocationIdentity().isSingle()) { ValueNode object = GraphUtil.unproxify(load.object()); UnsafeLoadCacheEntry identifier = new UnsafeLoadCacheEntry(object, load.offset(), load.getLocationIdentity());
*** 177,186 **** --- 181,191 ---- state.addCacheEntry(identifier, value); } else { processIdentity(state, write.getLocationIdentity()); } } + } } else if (node instanceof MemoryCheckpoint.Single) { LocationIdentity identity = ((MemoryCheckpoint.Single) node).getLocationIdentity(); processIdentity(state, identity); } else if (node instanceof MemoryCheckpoint.Multi) { for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getLocationIdentities()) {
< prev index next >