Skip to content

Commit

Permalink
flake issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LonelyCat124 committed Jan 28, 2025
1 parent 01912bd commit 9e75ce6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/psyclone/psyir/tools/definition_use_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def find_forward_accesses(self):
# If we have a basic block with no children then skip it,
# e.g. for an if block with no code before the else
# statement, as is found in NEMO4.
if(len(body) > 0):
if len(body) > 0:
# We make a copy of the reference to have a detached
# node to avoid handling the special cases based on
# the parents of the reference.
Expand Down Expand Up @@ -307,7 +307,7 @@ def find_forward_accesses(self):
# If we have a basic block with no children then skip it,
# e.g. for an if block with no code before the else
# statement, as is found in NEMO4.
if(len(block) == 0):
if len(block) == 0:
continue
chain = DefinitionUseChain(
self._reference,
Expand Down Expand Up @@ -847,7 +847,7 @@ def find_backward_accesses(self):
# If we have a basic block with no children then skip it,
# e.g. for an if block with no code before the else
# statement, as is found in NEMO4.
if(len(block) == 0):
if len(block) == 0:
continue
chain = DefinitionUseChain(
self._reference,
Expand Down Expand Up @@ -891,7 +891,7 @@ def find_backward_accesses(self):
# If we have a basic block with no children then skip it,
# e.g. for an if block with no code before the else
# statement, as is found in NEMO4.
if(len(body) > 0):
if len(body) > 0:
chain = DefinitionUseChain(
self._reference.copy(),
body,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ def test_definition_use_chains_backward_accesses_nonassign_reference_in_loop(
assert reaches[1] is routine.children[1].loop_body.children[0].lhs
assert reaches[2] is routine.children[0].lhs


def test_definition_use_chains_backward_accesses_empty_schedules(
fortran_reader,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ def test_definition_use_chains_forward_accesses_multiple_routines(
reaches = chains.find_forward_accesses()
assert len(reaches) == 0


def test_definition_use_chains_forward_accesses_empty_schedules(
fortran_reader,
):
Expand Down

0 comments on commit 9e75ce6

Please sign in to comment.