Skip to content

Commit

Permalink
Update slothy/targets/arm_v7m/arch_v7m.py
Browse files Browse the repository at this point in the history
Co-authored-by: Amin Abdulrahman <[email protected]>
  • Loading branch information
mkannwischer and dop-amin authored Dec 18, 2024
1 parent acb04d1 commit 5a91a29
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions slothy/targets/arm_v7m/arch_v7m.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ def end(self, other, indentation=0):


class BranchLoop(Loop):
"""
More general loop type that just considers the branch instruction as part of the boundary.
This can help to improve performance as the instructions that belong to handling the loop can be considered by SLOTHY aswell.
Note: This loop type is still rather experimental. It has a lot of logics inside as it needs to be able to "understand" a variety of different ways to express loops, e.g., how counters get incremented, how registers marking the end of the loop need to be modified in case of software pipelining etc. Currently, this type covers the three other types we offer above, namely `SubsLoop`, `CmpLoop`, and `VmovCmpLoop`.
For examples, we refer to the classes `SubsLoop`, `CmpLoop`, and `VmovCmpLoop`.
"""
def __init__(self, lbl="lbl", lbl_start="1", lbl_end="2", loop_init="lr") -> None:
super().__init__(lbl_start=lbl_start, lbl_end=lbl_end, loop_init=loop_init)
self.lbl = lbl
Expand Down

0 comments on commit 5a91a29

Please sign in to comment.