gpu: compute last_shared even if --no-private-memory is specified
gpu: compute last_shared even if --no-private-memory is specified

The --no-private-memory was introduced in 97ac18c (Add option to disable
the use of private and/or shared memory., Tue Aug 30 17:20:53 2011 +0100)
and caused the compute_private_size to be skipped entirely, even though
some parts of the function should be performed even if no private
memory is being used.  In particular, the last_shared field of each
array group should still be computed because the group may be mapped
to shared memory and then we also need this field in add_group_schedule.

Split off the computation of last_shared from compute_private_size
and call it unconditionally.

Reported-by: Tobias Grosser <059b8b880f8441509ec8a65b50b4c6ae74ebea76@grosser.es>
Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

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