gpu: compute last_shared even if --no-private-memory is specified
commitfbb78a4a34b6980394b2132219e1b69bc30a3c94
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 5 Dec 2012 09:59:12 +0000 (5 10:59 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 5 Dec 2012 10:03:43 +0000 (5 11:03 +0100)
treeb779f09bf037560822398603754190980b9f1743
parent698409252981e11c9d31d74334e05db570bae652
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>
gpu.c