Skip to content

Commit

Permalink
Fixed doc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LonelyCat124 committed Jan 14, 2025
1 parent c97975f commit 74c7081
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/psyclone/psyir/transformations/scalarization_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,21 @@ def _value_unused_after_loop(sig, var_accesses):
return True

def apply(self, node, options=None):
'''Apply the scalarization transformation to a loop.
'''
Apply the scalarization transformation to a loop.
All of the array accesses that are identified as being able to be
scalarized will be transformed by this transformation.
An array access will be scalarized if:
1. All accesses to the array use the same indexing statement.
2. All References contained in the indexing statement are not modified
inside of the loop (loop variables are ok).
inside of the loop (loop variables are ok).
3. The array symbol is either not accessed again or is written to
as its next access. If the next access is inside a conditional
that is not an ancestor of the input loop, then PSyclone will
assume that we cannot scalarize that value instead of attempting to
understand the control flow.
4. TODO - The array symbol is a local variable.
as its next access. If the next access is inside a conditional
that is not an ancestor of the input loop, then PSyclone will
assume that we cannot scalarize that value instead of attempting to
understand the control flow.
4. The array symbol is a local variable.
:param node: the supplied loop to apply scalarization to.
:type node: :py:class:`psyclone.psyir.nodes.Loop`
Expand Down

0 comments on commit 74c7081

Please sign in to comment.