Skip to content

Commit 67eeb49

Browse files
committed
compiler: Tweak CireInvariants
1 parent 3a3df47 commit 67eeb49

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

devito/passes/clusters/aliases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,15 @@ def process(self, clusters):
291291
def callback(self, clusters, prefix, xtracted=None):
292292
if not prefix:
293293
return clusters
294-
d = prefix[-1].dim
294+
p = prefix[-1]
295+
d = p.dim
295296

296297
# Rule out extractions that would break data dependencies
297298
exclude = set().union(*[c.scope.writes for c in clusters])
298299

299300
# Rule out extractions that depend on the Dimension currently investigated,
300301
# as they clearly wouldn't be invariants
301-
exclude.add(d)
302+
exclude.update({d, *p.sub_iterators})
302303

303304
key = lambda c: self._lookup_key(c, d)
304305
processed = list(clusters)

0 commit comments

Comments
 (0)