`InlineMultistateSDFG` Destroys SSA Invariant
- Dominant language
- Python
- Stars
- 593
- Forks
- 163
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 60
Description
This is not a bug per se, as the resulting SDFGs are correct, however, the `InlineMultistateSDFG` transformation destroys the SSA invariant of SDFGs, which is a less than optimal behaviour.
Consider the following SDFG:

The first nested SDFG writes into `T1` which is then written into `T3[0:a]`, the second nested SDFG writes its output into `T2` which is then copied into `T3[a:N]`.
`T3` is then finally written into the global memory `G`.
As you can see al _transients_ are written to exactly once, for certain reason (I am looking at you FORTRAN) we can not enforce this on global data, but this is not the issue here.
After we run `InlineMultistateSDFG` we get the following SDFG:

As you can see now the writing of the output, i.e. `{(T1), (T2)} -> (T3) -> (G)` is now split and put into different states.
Thus the transients are no longer SSA.
Since SSA is a very nice and useful property I would think/expect/hope that the transformation would maintain this invariant.
Thus from this perspective it is a bug.
Contributor guide
Assessment
This issue has not been assessed yet.