gpu.c: collect_order_dependences: extract out gpu_array_can_be_private
The information about whether an array can be mapped to private
memory is used in both collect_order_dependences and
check_scalar_live_ranges_in_host, but it is determined in a slightly
different way. Extract out a function for determining this information
from collect_order_dependences so that it can be reused in
check_scalar_live_ranges_in_host.
The extracted function will also make it easier to change the decision
about which arrays should be allowed to be mapped to private memory.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>