43972
|
1 |
/*
|
58877
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
43972
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation.
|
|
8 |
*
|
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
13 |
* accompanied this code).
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License version
|
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 |
*
|
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
* or visit www.oracle.com if you need additional information or have any
|
|
21 |
* questions.
|
|
22 |
*/
|
50858
|
23 |
|
|
24 |
|
43972
|
25 |
package org.graalvm.compiler.virtual.phases.ea;
|
|
26 |
|
|
27 |
import static org.graalvm.compiler.core.common.GraalOptions.ReadEliminationMaxLoopVisits;
|
49873
|
28 |
import static jdk.internal.vm.compiler.word.LocationIdentity.any;
|
43972
|
29 |
|
|
30 |
import java.util.Iterator;
|
|
31 |
import java.util.List;
|
|
32 |
|
49873
|
33 |
import jdk.internal.vm.compiler.collections.EconomicMap;
|
|
34 |
import jdk.internal.vm.compiler.collections.EconomicSet;
|
|
35 |
import jdk.internal.vm.compiler.collections.Equivalence;
|
|
36 |
import jdk.internal.vm.compiler.collections.MapCursor;
|
43972
|
37 |
import org.graalvm.compiler.core.common.cfg.Loop;
|
|
38 |
import org.graalvm.compiler.core.common.type.Stamp;
|
|
39 |
import org.graalvm.compiler.graph.Node;
|
|
40 |
import org.graalvm.compiler.nodes.FieldLocationIdentity;
|
|
41 |
import org.graalvm.compiler.nodes.FixedWithNextNode;
|
|
42 |
import org.graalvm.compiler.nodes.LoopExitNode;
|
48190
|
43 |
import org.graalvm.compiler.nodes.NodeView;
|
43972
|
44 |
import org.graalvm.compiler.nodes.PhiNode;
|
|
45 |
import org.graalvm.compiler.nodes.ProxyNode;
|
|
46 |
import org.graalvm.compiler.nodes.ValueNode;
|
|
47 |
import org.graalvm.compiler.nodes.ValuePhiNode;
|
|
48 |
import org.graalvm.compiler.nodes.ValueProxyNode;
|
|
49 |
import org.graalvm.compiler.nodes.cfg.Block;
|
|
50 |
import org.graalvm.compiler.nodes.cfg.ControlFlowGraph;
|
|
51 |
import org.graalvm.compiler.nodes.extended.GuardedNode;
|
46344
|
52 |
import org.graalvm.compiler.nodes.extended.GuardingNode;
|
|
53 |
import org.graalvm.compiler.nodes.extended.RawLoadNode;
|
|
54 |
import org.graalvm.compiler.nodes.extended.RawStoreNode;
|
46640
|
55 |
import org.graalvm.compiler.nodes.extended.UnsafeAccessNode;
|
43972
|
56 |
import org.graalvm.compiler.nodes.java.AccessFieldNode;
|
|
57 |
import org.graalvm.compiler.nodes.java.LoadFieldNode;
|
|
58 |
import org.graalvm.compiler.nodes.java.StoreFieldNode;
|
|
59 |
import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
|
|
60 |
import org.graalvm.compiler.nodes.memory.ReadNode;
|
|
61 |
import org.graalvm.compiler.nodes.memory.WriteNode;
|
47667
|
62 |
import org.graalvm.compiler.nodes.type.StampTool;
|
43972
|
63 |
import org.graalvm.compiler.nodes.util.GraphUtil;
|
46344
|
64 |
import org.graalvm.compiler.options.OptionValues;
|
43972
|
65 |
import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.CacheEntry;
|
|
66 |
import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.LoadCacheEntry;
|
|
67 |
import org.graalvm.compiler.virtual.phases.ea.ReadEliminationBlockState.UnsafeLoadCacheEntry;
|
49873
|
68 |
import jdk.internal.vm.compiler.word.LocationIdentity;
|
43972
|
69 |
|
|
70 |
import jdk.vm.ci.meta.JavaKind;
|
48861
|
71 |
import jdk.vm.ci.meta.ResolvedJavaType;
|
43972
|
72 |
|
46344
|
73 |
/**
|
|
74 |
* This closure initially handled a set of nodes that is disjunct from
|
|
75 |
* {@link PEReadEliminationClosure}, but over time both have evolved so that there's a significant
|
|
76 |
* overlap.
|
|
77 |
*/
|
|
78 |
public final class ReadEliminationClosure extends EffectsClosure<ReadEliminationBlockState> {
|
46551
|
79 |
private final boolean considerGuards;
|
43972
|
80 |
|
46551
|
81 |
public ReadEliminationClosure(ControlFlowGraph cfg, boolean considerGuards) {
|
43972
|
82 |
super(null, cfg);
|
46551
|
83 |
this.considerGuards = considerGuards;
|
43972
|
84 |
}
|
|
85 |
|
|
86 |
@Override
|
|
87 |
protected ReadEliminationBlockState getInitialState() {
|
|
88 |
return new ReadEliminationBlockState();
|
|
89 |
}
|
|
90 |
|
|
91 |
@Override
|
|
92 |
protected boolean processNode(Node node, ReadEliminationBlockState state, GraphEffectList effects, FixedWithNextNode lastFixedNode) {
|
|
93 |
boolean deleted = false;
|
|
94 |
if (node instanceof AccessFieldNode) {
|
|
95 |
AccessFieldNode access = (AccessFieldNode) node;
|
|
96 |
if (access.isVolatile()) {
|
|
97 |
processIdentity(state, any());
|
|
98 |
} else {
|
|
99 |
ValueNode object = GraphUtil.unproxify(access.object());
|
|
100 |
LoadCacheEntry identifier = new LoadCacheEntry(object, new FieldLocationIdentity(access.field()));
|
|
101 |
ValueNode cachedValue = state.getCacheEntry(identifier);
|
|
102 |
if (node instanceof LoadFieldNode) {
|
48190
|
103 |
if (cachedValue != null && access.stamp(NodeView.DEFAULT).isCompatible(cachedValue.stamp(NodeView.DEFAULT))) {
|
46344
|
104 |
effects.replaceAtUsages(access, cachedValue, access);
|
43972
|
105 |
addScalarAlias(access, cachedValue);
|
|
106 |
deleted = true;
|
|
107 |
} else {
|
|
108 |
state.addCacheEntry(identifier, access);
|
|
109 |
}
|
|
110 |
} else {
|
|
111 |
assert node instanceof StoreFieldNode;
|
|
112 |
StoreFieldNode store = (StoreFieldNode) node;
|
|
113 |
ValueNode value = getScalarAlias(store.value());
|
|
114 |
if (GraphUtil.unproxify(value) == GraphUtil.unproxify(cachedValue)) {
|
|
115 |
effects.deleteNode(store);
|
|
116 |
deleted = true;
|
|
117 |
}
|
|
118 |
state.killReadCache(identifier.identity);
|
|
119 |
state.addCacheEntry(identifier, value);
|
|
120 |
}
|
|
121 |
}
|
|
122 |
} else if (node instanceof ReadNode) {
|
|
123 |
ReadNode read = (ReadNode) node;
|
|
124 |
if (read.getLocationIdentity().isSingle()) {
|
|
125 |
ValueNode object = GraphUtil.unproxify(read.getAddress());
|
|
126 |
LoadCacheEntry identifier = new LoadCacheEntry(object, read.getLocationIdentity());
|
|
127 |
ValueNode cachedValue = state.getCacheEntry(identifier);
|
46551
|
128 |
if (cachedValue != null && areValuesReplaceable(read, cachedValue, considerGuards)) {
|
46344
|
129 |
effects.replaceAtUsages(read, cachedValue, read);
|
43972
|
130 |
addScalarAlias(read, cachedValue);
|
|
131 |
deleted = true;
|
|
132 |
} else {
|
|
133 |
state.addCacheEntry(identifier, read);
|
|
134 |
}
|
|
135 |
}
|
|
136 |
} else if (node instanceof WriteNode) {
|
|
137 |
WriteNode write = (WriteNode) node;
|
58877
|
138 |
if (write.getKilledLocationIdentity().isSingle()) {
|
43972
|
139 |
ValueNode object = GraphUtil.unproxify(write.getAddress());
|
58877
|
140 |
LoadCacheEntry identifier = new LoadCacheEntry(object, write.getKilledLocationIdentity());
|
43972
|
141 |
ValueNode cachedValue = state.getCacheEntry(identifier);
|
|
142 |
|
|
143 |
ValueNode value = getScalarAlias(write.value());
|
|
144 |
if (GraphUtil.unproxify(value) == GraphUtil.unproxify(cachedValue)) {
|
|
145 |
effects.deleteNode(write);
|
|
146 |
deleted = true;
|
|
147 |
}
|
58877
|
148 |
processIdentity(state, write.getKilledLocationIdentity());
|
43972
|
149 |
state.addCacheEntry(identifier, value);
|
|
150 |
} else {
|
58877
|
151 |
processIdentity(state, write.getKilledLocationIdentity());
|
43972
|
152 |
}
|
|
153 |
} else if (node instanceof UnsafeAccessNode) {
|
47667
|
154 |
ResolvedJavaType type = StampTool.typeOrNull(((UnsafeAccessNode) node).object());
|
|
155 |
if (type != null && !type.isArray()) {
|
|
156 |
if (node instanceof RawLoadNode) {
|
|
157 |
RawLoadNode load = (RawLoadNode) node;
|
|
158 |
if (load.getLocationIdentity().isSingle()) {
|
|
159 |
ValueNode object = GraphUtil.unproxify(load.object());
|
|
160 |
UnsafeLoadCacheEntry identifier = new UnsafeLoadCacheEntry(object, load.offset(), load.getLocationIdentity());
|
|
161 |
ValueNode cachedValue = state.getCacheEntry(identifier);
|
|
162 |
if (cachedValue != null && areValuesReplaceable(load, cachedValue, considerGuards)) {
|
|
163 |
effects.replaceAtUsages(load, cachedValue, load);
|
|
164 |
addScalarAlias(load, cachedValue);
|
|
165 |
deleted = true;
|
|
166 |
} else {
|
|
167 |
state.addCacheEntry(identifier, load);
|
|
168 |
}
|
43972
|
169 |
}
|
47667
|
170 |
} else {
|
|
171 |
assert node instanceof RawStoreNode;
|
|
172 |
RawStoreNode write = (RawStoreNode) node;
|
58877
|
173 |
if (write.getKilledLocationIdentity().isSingle()) {
|
47667
|
174 |
ValueNode object = GraphUtil.unproxify(write.object());
|
58877
|
175 |
UnsafeLoadCacheEntry identifier = new UnsafeLoadCacheEntry(object, write.offset(), write.getKilledLocationIdentity());
|
47667
|
176 |
ValueNode cachedValue = state.getCacheEntry(identifier);
|
43972
|
177 |
|
47667
|
178 |
ValueNode value = getScalarAlias(write.value());
|
|
179 |
if (GraphUtil.unproxify(value) == GraphUtil.unproxify(cachedValue)) {
|
|
180 |
effects.deleteNode(write);
|
|
181 |
deleted = true;
|
|
182 |
}
|
58877
|
183 |
processIdentity(state, write.getKilledLocationIdentity());
|
47667
|
184 |
state.addCacheEntry(identifier, value);
|
|
185 |
} else {
|
58877
|
186 |
processIdentity(state, write.getKilledLocationIdentity());
|
43972
|
187 |
}
|
|
188 |
}
|
|
189 |
}
|
|
190 |
} else if (node instanceof MemoryCheckpoint.Single) {
|
58877
|
191 |
LocationIdentity identity = ((MemoryCheckpoint.Single) node).getKilledLocationIdentity();
|
43972
|
192 |
processIdentity(state, identity);
|
|
193 |
} else if (node instanceof MemoryCheckpoint.Multi) {
|
58877
|
194 |
for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getKilledLocationIdentities()) {
|
43972
|
195 |
processIdentity(state, identity);
|
|
196 |
}
|
|
197 |
}
|
|
198 |
return deleted;
|
|
199 |
}
|
|
200 |
|
46551
|
201 |
private static boolean areValuesReplaceable(ValueNode originalValue, ValueNode replacementValue, boolean considerGuards) {
|
48190
|
202 |
return originalValue.stamp(NodeView.DEFAULT).isCompatible(replacementValue.stamp(NodeView.DEFAULT)) &&
|
46551
|
203 |
(!considerGuards || (getGuard(originalValue) == null || getGuard(originalValue) == getGuard(replacementValue)));
|
46344
|
204 |
}
|
|
205 |
|
|
206 |
private static GuardingNode getGuard(ValueNode node) {
|
|
207 |
if (node instanceof GuardedNode) {
|
|
208 |
GuardedNode guardedNode = (GuardedNode) node;
|
|
209 |
return guardedNode.getGuard();
|
|
210 |
}
|
|
211 |
return null;
|
|
212 |
}
|
|
213 |
|
43972
|
214 |
private static void processIdentity(ReadEliminationBlockState state, LocationIdentity identity) {
|
|
215 |
if (identity.isAny()) {
|
|
216 |
state.killReadCache();
|
|
217 |
return;
|
|
218 |
}
|
|
219 |
state.killReadCache(identity);
|
|
220 |
}
|
|
221 |
|
|
222 |
@Override
|
|
223 |
protected void processLoopExit(LoopExitNode exitNode, ReadEliminationBlockState initialState, ReadEliminationBlockState exitState, GraphEffectList effects) {
|
|
224 |
if (exitNode.graph().hasValueProxies()) {
|
46344
|
225 |
MapCursor<CacheEntry<?>, ValueNode> entry = exitState.getReadCache().getEntries();
|
|
226 |
while (entry.advance()) {
|
43972
|
227 |
if (initialState.getReadCache().get(entry.getKey()) != entry.getValue()) {
|
|
228 |
ProxyNode proxy = new ValueProxyNode(exitState.getCacheEntry(entry.getKey()), exitNode);
|
|
229 |
effects.addFloatingNode(proxy, "readCacheProxy");
|
46344
|
230 |
exitState.getReadCache().put(entry.getKey(), proxy);
|
43972
|
231 |
}
|
|
232 |
}
|
|
233 |
}
|
|
234 |
}
|
|
235 |
|
|
236 |
@Override
|
|
237 |
protected ReadEliminationBlockState cloneState(ReadEliminationBlockState other) {
|
|
238 |
return new ReadEliminationBlockState(other);
|
|
239 |
}
|
|
240 |
|
|
241 |
@Override
|
|
242 |
protected MergeProcessor createMergeProcessor(Block merge) {
|
|
243 |
return new ReadEliminationMergeProcessor(merge);
|
|
244 |
}
|
|
245 |
|
|
246 |
private class ReadEliminationMergeProcessor extends EffectsClosure<ReadEliminationBlockState>.MergeProcessor {
|
|
247 |
|
46344
|
248 |
private final EconomicMap<Object, ValuePhiNode> materializedPhis = EconomicMap.create(Equivalence.DEFAULT);
|
43972
|
249 |
|
|
250 |
ReadEliminationMergeProcessor(Block mergeBlock) {
|
|
251 |
super(mergeBlock);
|
|
252 |
}
|
|
253 |
|
46344
|
254 |
protected ValuePhiNode getCachedPhi(CacheEntry<?> virtual, Stamp stamp) {
|
43972
|
255 |
ValuePhiNode result = materializedPhis.get(virtual);
|
|
256 |
if (result == null) {
|
|
257 |
result = createValuePhi(stamp);
|
|
258 |
materializedPhis.put(virtual, result);
|
|
259 |
}
|
|
260 |
return result;
|
|
261 |
}
|
|
262 |
|
|
263 |
@Override
|
|
264 |
protected void merge(List<ReadEliminationBlockState> states) {
|
46344
|
265 |
MapCursor<CacheEntry<?>, ValueNode> cursor = states.get(0).readCache.getEntries();
|
|
266 |
while (cursor.advance()) {
|
|
267 |
CacheEntry<?> key = cursor.getKey();
|
|
268 |
ValueNode value = cursor.getValue();
|
43972
|
269 |
boolean phi = false;
|
|
270 |
for (int i = 1; i < states.size(); i++) {
|
|
271 |
ValueNode otherValue = states.get(i).readCache.get(key);
|
46344
|
272 |
// E.g. unsafe loads / stores with different access kinds have different stamps
|
|
273 |
// although location, object and offset are the same. In this case we cannot
|
|
274 |
// create a phi nor can we set a common value.
|
48190
|
275 |
if (otherValue == null || !value.stamp(NodeView.DEFAULT).isCompatible(otherValue.stamp(NodeView.DEFAULT))) {
|
43972
|
276 |
value = null;
|
|
277 |
phi = false;
|
|
278 |
break;
|
|
279 |
}
|
|
280 |
if (!phi && otherValue != value) {
|
|
281 |
phi = true;
|
|
282 |
}
|
|
283 |
}
|
|
284 |
if (phi) {
|
48190
|
285 |
PhiNode phiNode = getCachedPhi(key, value.stamp(NodeView.DEFAULT).unrestricted());
|
43972
|
286 |
mergeEffects.addFloatingNode(phiNode, "mergeReadCache");
|
|
287 |
for (int i = 0; i < states.size(); i++) {
|
|
288 |
ValueNode v = states.get(i).getCacheEntry(key);
|
48190
|
289 |
assert phiNode.stamp(NodeView.DEFAULT).isCompatible(v.stamp(NodeView.DEFAULT)) : "Cannot create read elimination phi for inputs with incompatible stamps.";
|
43972
|
290 |
setPhiInput(phiNode, i, v);
|
|
291 |
}
|
|
292 |
newState.addCacheEntry(key, phiNode);
|
|
293 |
} else if (value != null) {
|
|
294 |
// case that there is the same value on all branches
|
|
295 |
newState.addCacheEntry(key, value);
|
|
296 |
}
|
|
297 |
}
|
46344
|
298 |
/*
|
|
299 |
* For object phis, see if there are known reads on all predecessors, for which we could
|
|
300 |
* create new phis.
|
|
301 |
*/
|
43972
|
302 |
for (PhiNode phi : getPhis()) {
|
|
303 |
if (phi.getStackKind() == JavaKind.Object) {
|
46344
|
304 |
for (CacheEntry<?> entry : states.get(0).readCache.getKeys()) {
|
|
305 |
if (entry.object == getPhiValueAt(phi, 0)) {
|
|
306 |
mergeReadCachePhi(phi, entry, states);
|
43972
|
307 |
}
|
|
308 |
}
|
|
309 |
}
|
|
310 |
}
|
|
311 |
}
|
|
312 |
|
|
313 |
private void mergeReadCachePhi(PhiNode phi, CacheEntry<?> identifier, List<ReadEliminationBlockState> states) {
|
|
314 |
ValueNode[] values = new ValueNode[states.size()];
|
|
315 |
values[0] = states.get(0).getCacheEntry(identifier.duplicateWithObject(getPhiValueAt(phi, 0)));
|
|
316 |
if (values[0] != null) {
|
|
317 |
for (int i = 1; i < states.size(); i++) {
|
|
318 |
ValueNode value = states.get(i).getCacheEntry(identifier.duplicateWithObject(getPhiValueAt(phi, i)));
|
|
319 |
// e.g. unsafe loads / stores with same identity and different access kinds see
|
|
320 |
// mergeReadCache(states)
|
48190
|
321 |
if (value == null || !values[i - 1].stamp(NodeView.DEFAULT).isCompatible(value.stamp(NodeView.DEFAULT))) {
|
43972
|
322 |
return;
|
|
323 |
}
|
|
324 |
values[i] = value;
|
|
325 |
}
|
|
326 |
|
|
327 |
CacheEntry<?> newIdentifier = identifier.duplicateWithObject(phi);
|
48190
|
328 |
PhiNode phiNode = getCachedPhi(newIdentifier, values[0].stamp(NodeView.DEFAULT).unrestricted());
|
43972
|
329 |
mergeEffects.addFloatingNode(phiNode, "mergeReadCachePhi");
|
|
330 |
for (int i = 0; i < values.length; i++) {
|
|
331 |
setPhiInput(phiNode, i, values[i]);
|
|
332 |
}
|
|
333 |
newState.addCacheEntry(newIdentifier, phiNode);
|
|
334 |
}
|
|
335 |
}
|
|
336 |
}
|
|
337 |
|
|
338 |
@Override
|
|
339 |
protected void processKilledLoopLocations(Loop<Block> loop, ReadEliminationBlockState initialState, ReadEliminationBlockState mergedStates) {
|
|
340 |
assert initialState != null;
|
|
341 |
assert mergedStates != null;
|
|
342 |
if (initialState.readCache.size() > 0) {
|
|
343 |
LoopKillCache loopKilledLocations = loopLocationKillCache.get(loop);
|
|
344 |
// we have fully processed this loop the first time, remember to cache it the next time
|
|
345 |
// it is visited
|
|
346 |
if (loopKilledLocations == null) {
|
|
347 |
loopKilledLocations = new LoopKillCache(1/* 1.visit */);
|
|
348 |
loopLocationKillCache.put(loop, loopKilledLocations);
|
|
349 |
} else {
|
46344
|
350 |
OptionValues options = loop.getHeader().getBeginNode().getOptions();
|
|
351 |
if (loopKilledLocations.visits() > ReadEliminationMaxLoopVisits.getValue(options)) {
|
43972
|
352 |
// we have processed the loop too many times, kill all locations so the inner
|
|
353 |
// loop will never be processed more than once again on visit
|
|
354 |
loopKilledLocations.setKillsAll();
|
|
355 |
} else {
|
|
356 |
// we have fully processed this loop >1 times, update the killed locations
|
46344
|
357 |
EconomicSet<LocationIdentity> forwardEndLiveLocations = EconomicSet.create(Equivalence.DEFAULT);
|
|
358 |
for (CacheEntry<?> entry : initialState.readCache.getKeys()) {
|
43972
|
359 |
forwardEndLiveLocations.add(entry.getIdentity());
|
|
360 |
}
|
46344
|
361 |
for (CacheEntry<?> entry : mergedStates.readCache.getKeys()) {
|
43972
|
362 |
forwardEndLiveLocations.remove(entry.getIdentity());
|
|
363 |
}
|
|
364 |
// every location that is alive before the loop but not after is killed by the
|
|
365 |
// loop
|
|
366 |
for (LocationIdentity location : forwardEndLiveLocations) {
|
|
367 |
loopKilledLocations.rememberLoopKilledLocation(location);
|
|
368 |
}
|
46640
|
369 |
if (debug.isLogEnabled() && loopKilledLocations != null) {
|
|
370 |
debug.log("[Early Read Elimination] Setting loop killed locations of loop at node %s with %s",
|
43972
|
371 |
loop.getHeader().getBeginNode(), forwardEndLiveLocations);
|
|
372 |
}
|
|
373 |
}
|
|
374 |
// remember the loop visit
|
|
375 |
loopKilledLocations.visited();
|
|
376 |
}
|
|
377 |
}
|
|
378 |
}
|
|
379 |
|
|
380 |
@Override
|
|
381 |
protected ReadEliminationBlockState stripKilledLoopLocations(Loop<Block> loop, ReadEliminationBlockState originalInitialState) {
|
|
382 |
ReadEliminationBlockState initialState = super.stripKilledLoopLocations(loop, originalInitialState);
|
|
383 |
LoopKillCache loopKilledLocations = loopLocationKillCache.get(loop);
|
|
384 |
if (loopKilledLocations != null && loopKilledLocations.loopKillsLocations()) {
|
46344
|
385 |
Iterator<CacheEntry<?>> it = initialState.readCache.getKeys().iterator();
|
43972
|
386 |
while (it.hasNext()) {
|
|
387 |
CacheEntry<?> entry = it.next();
|
|
388 |
if (loopKilledLocations.containsLocation(entry.getIdentity())) {
|
|
389 |
it.remove();
|
|
390 |
}
|
|
391 |
}
|
|
392 |
}
|
|
393 |
return initialState;
|
|
394 |
}
|
|
395 |
}
|