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 <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>