gpu: check reuse and access to consecutive elements within kernel
gpu: check reuse and access to consecutive elements within kernel

Previously, we would consider reuse in the entire program, possibly
leading to incorrect decisions on whether to map data to shared
memory or registers.  Only consider reuse inside the given kernel.
Similarly for the check whether two consecutive elements are accessed.

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

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