Skip to content
Snippets Groups Projects
Commit 3c894106 authored by Daniel Bauer's avatar Daniel Bauer :speech_balloon:
Browse files

fall back to symbols_defined (like the old implementation)

parent 88170aa4
Branches
Tags
1 merge request!343Do not reorder accesses in `move_constants_before_loop` (quickly)
...@@ -607,8 +607,8 @@ def move_constants_before_loop(ast_node): ...@@ -607,8 +607,8 @@ def move_constants_before_loop(ast_node):
elif isinstance(node, ast.KernelFunction): elif isinstance(node, ast.KernelFunction):
return False return False
else: else:
raise NotImplementedError(f'Due to defensive programming we handle only specific expressions.\n' defs = {s.name for s in node.symbols_defined}
f'The expression {node} of type {type(node)} is not known yet.') return bool(symbol_names.intersection(defs))
dependencies = {s.name for s in node.undefined_symbols} dependencies = {s.name for s in node.undefined_symbols}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment