From ab8fd92192337ad670bbfc62824c45a0cc8224b9 Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Thu, 20 Apr 2023 14:00:31 +0000 Subject: [PATCH] compiler: Drop .find where possible --- devito/ir/support/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devito/ir/support/basic.py b/devito/ir/support/basic.py index 855c7fae4ca..b73b49befea 100644 --- a/devito/ir/support/basic.py +++ b/devito/ir/support/basic.py @@ -865,7 +865,7 @@ def __init__(self, exprs, rules=None): # Objects altering the control flow (e.g., synchronization barriers, # break statements, ...) are converted into mock dependences for i, e in enumerate(exprs): - if e.find(Barrier) | e.find(Jump): + if isinstance(e.rhs, (Barrier, Jump)): self.writes.setdefault(mocksym, []).append( TimedAccess(mocksym, 'W', i, e.ispace) )