Right now we inline all sequential chain calls of stencil.applies (Example x(y(z(a))) where x, y, z are stencil applies and a is the original data).
We also combine "parallel" stencil.applies in the inlining pass if they use the same intermediate result (Example: x(y(a), z(a)), where x, y, z are stencil.applies and a is the original data. This will become one big apply).
However we do not combine parallel stencil.applies if the only thing they have in common is input data (Example: x(a), y(a), where x, y are stencil applies and a is input data they have in common. These are not combined at the moment.)
The task is to write a pass that allows combination in the 3rd case.
The task is to write a pass that allows combination in the 3rd case.