Skip to content

Commit 1d8097e

Browse files
committed
compiler: Tweak CireInvariants
1 parent 24f0cc4 commit 1d8097e

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
@@ -292,14 +292,15 @@ def process(self, clusters):
292292
def callback(self, clusters, prefix, xtracted=None):
293293
if not prefix:
294294
return clusters
295-
d = prefix[-1].dim
295+
p = prefix[-1]
296+
d = p.dim
296297

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

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

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

0 commit comments

Comments
 (0)