Skip to content

Commit

Permalink
#1823 Improve coverage and add TODO in module-inline transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
sergisiso committed Oct 5, 2022
1 parent c90afb4 commit 00b9858
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def validate(self, node, options=None):
# Check that all kernel symbols are declared in the kernel
# symbol table(s). At this point they may be declared in a
# container containing this kernel which is not supported.
# TODO #1823: What about symbols not in References (e.g.
# literal datatypes, parameters initializations, ...)
# It could be more nuanced. Global parameters can be
# brought into the inlined subroutine scope
for var in kernel_schedule.walk(Reference):
try:
var.scope.symbol_table.lookup(
Expand Down Expand Up @@ -168,12 +172,8 @@ def _prepare_code_to_inline(node):
for mod in source_container.symbol_table.containersymbols:
symbols_to_bring_in.add(mod)
elif symbol.is_import:
pass # Add to bring in if imported outside?
elif symbol.is_local:
# This should be on the validate
# Ok if is a constant, otherwise it should be an
# # error?
pass
# Add to symbols_to_bring_in
symbols_to_bring_in.add(symbol.interface.container_symbol)

for symbol in symbols_to_bring_in:
if symbol.name in code_to_inline.symbol_table:
Expand Down

0 comments on commit 00b9858

Please sign in to comment.