From 7bbc2cdc75a131d31b9a8c1cca8d4fac49a4818b Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Mon, 19 Jun 2023 13:31:22 +0100 Subject: [PATCH] Remove checks on item name matching routine name --- scripts/loki_transform.py | 2 -- tests/test_scheduler.py | 3 --- transformations/transformations/derived_types.py | 4 ---- transformations/transformations/utility_routines.py | 3 --- 4 files changed, 12 deletions(-) diff --git a/scripts/loki_transform.py b/scripts/loki_transform.py index 2fbc9acc9..5b3797162 100644 --- a/scripts/loki_transform.py +++ b/scripts/loki_transform.py @@ -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()) diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 55422220b..0906bd425 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -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 diff --git a/transformations/transformations/derived_types.py b/transformations/transformations/derived_types.py index bf29aceb9..0db11e298 100644 --- a/transformations/transformations/derived_types.py +++ b/transformations/transformations/derived_types.py @@ -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] = {} diff --git a/transformations/transformations/utility_routines.py b/transformations/transformations/utility_routines.py index 42968eb4d..67f816bad 100644 --- a/transformations/transformations/utility_routines.py +++ b/transformations/transformations/utility_routines.py @@ -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