PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Integrating induction variable replacement with dependency tools

Open hiker opened this issue 2 years ago • 0 comments

In #1778 a new replace_induction_variable transformation was introduced. We need to find a way to best integrate this into the dependency analysis tools. Some issue to consider:

  • At this stage, because of adding assignments to the removed induction variables to the end of the loop, this transformation can prevent loop optimisations (e.g. loop fusion), since two previously consecutive loops are now not consecutive anymore.
  • Maybe the dep-tools could work on a copy of the tree - but considering that #1712 might add pointer to the nodes to the messages - these pointer would now point to a copy of the tree, not the original tree anymore.
  • maybe we need a higher-level replace-induction-variable transformation that looks at this on a subroutine level. We might then know when assignments after the loop can be removed?
  • And/or maybe we can add an option to the transformation that will allow the user to disable the insertion of values at the end of a loop?

We likely need some experience on how this transformation would be most useful.

hiker avatar Jul 06 '22 06:07 hiker