array reference grouping: try grouping reads that overlap at tile depth
array reference grouping: try grouping reads that overlap at tile depth

When checking whether two shared memory tiles can be combined to a single
smaller shared memory tile, the original code would only consider
pairs of tiles that have overlapping accesses at the innermost level.
It should be useful to also consider pairs of tiles that have overlapping
accesses at the level where they are currently being introduced.

The same test is also used for checking for overlapping writes,
so this function can now be reused.

Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

nicolasvasilache/ppcg,Meinersbur/ppcg,Meinersbur/ppcg,nicolasvasilache/ppcg