From a6a7b521a5da64f2aecd3e3fdc72f7d493aea3f1 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Thu, 10 Nov 2016 18:04:01 +0100 Subject: [PATCH] Fix iname matching kernel query language 2 bugs: * a C&P bug in interning (harmless) * wrong field of instructions is accessed to actually match inames Previously using iname to match instructions threw an AttributeError. --- loopy/match.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loopy/match.py b/loopy/match.py index 2c6a18a8d..002540e43 100644 --- a/loopy/match.py +++ b/loopy/match.py @@ -72,7 +72,7 @@ _id = intern("_id") _tag = intern("_tag") _writes = intern("_writes") _reads = intern("_reads") -_iname = intern("_reads") +_iname = intern("_iname") _whitespace = intern("_whitespace") @@ -246,7 +246,7 @@ class Reads(GlobMatchExpressionBase): class Iname(GlobMatchExpressionBase): def __call__(self, kernel, matchable): return any(self.re.match(name) - for name in matchable.inames(kernel)) + for name in matchable.within_inames) # }}} -- GitLab