Skip to content

Commit

Permalink
Remove checks on item name matching routine name
Browse files Browse the repository at this point in the history
  • Loading branch information
reuterbal committed Jun 19, 2023
1 parent ac54750 commit 7bbc2cd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ def convert(out_path, path, header, cpp, directive, include, define, omni_includ
# to normalize the 1:end-style index ranges that OMNI introduces
class NormalizeRangeIndexingTransformation(Transformation):
def transform_subroutine(self, routine, **kwargs):
if 'item' in kwargs and kwargs['item'].local_name != routine.name:
return
normalize_range_indexing(routine)

scheduler.process(transformation=NormalizeRangeIndexingTransformation())
Expand Down
3 changes: 0 additions & 3 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,9 +1857,6 @@ def __init__(self, **kwargs):

def transform_subroutine(self, routine, **kwargs):
item = kwargs.get('item')
if item and item.local_name != routine.name.lower():
return

assert item.local_name in ('caller', 'routine', 'some_procedure', 'other')
self.counter[item.local_name] = self.counter.get(item.local_name, 0) + 1

Expand Down
4 changes: 0 additions & 4 deletions transformations/transformations/derived_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ def transform_subroutine(self, routine, **kwargs):
role = kwargs.get('role')
item = kwargs.get('item')

# Bail out if the current subroutine is not part of the call tree
if item and item.local_name != routine.name.lower():
return

# Initialize the transformation data dictionary
if item:
item.trafo_data[self._key] = {}
Expand Down
3 changes: 0 additions & 3 deletions transformations/transformations/utility_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ def transform_subroutine(self, routine, **kwargs):
"""
Apply transformation to subroutine object
"""
if 'item' in kwargs and kwargs['item'].local_name != routine.name.lower():
return

mapper = {}

# First remove inline conditionals with calls to specified routines or intrinsics
Expand Down

0 comments on commit 7bbc2cd

Please sign in to comment.