isl_union_*: use consistent hash values
In
4d102a4 (only allow a single isl_pw_* object with given domain space
in isl_union_pw_*, Sat Jun 7 11:19:41 2014 +0200), the isl_union_* objects
were changed to only contain a single entry with a given domain space.
However, the hash value in the table would still be computed based
on the complete space, meaning that multiple entries with the same
domain space would not necessarily get detected if the hash values
for the complete spaces are different.
Moreover, isl_union_*_eval would use the hash value of the domain space,
meaning that it would not be able to find the right entry.
Consistently use the hash value of the domain space to solve this problem.
Moreover, extract out the handling into a new isl_union_*_find_part_entry
function to reduce the risk of inconsistencies.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>