isl_flow.c: compute_val_based_dependences: use correct space for partial results
commitb4ae615a414b4961b32f75c7510bbcb961e0d8fe
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 24 Apr 2014 09:03:22 +0000 (24 11:03 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 24 Apr 2014 10:08:35 +0000 (24 12:08 +0200)
tree3290dcb9ae3682979a8bcb5684d41ee463c5a5b7
parent91aaa8cecf6c99d42683d6a3ce6e6324f2d16ca6
isl_flow.c: compute_val_based_dependences: use correct space for partial results

In 0eacaaa (isl_access_info_compute_flow: handle may accesses,
Wed May 26 20:51:25 2010 +0200), the "dep" array of isl_flow was extended
to keep track of both may and must dependences (for must sources).
However, the initialization of must_rel inside compute_val_based_dependences
was not modified to take into account that this array contains
two dependence relations per must source, possibly resulting in the use
of the wrong space.

This problem went mostly unnoticed because must_rel is later
updated by isl_map_union_disjoint and isl_map_union_disjoint
does not currently check if the inputs live in the same space
when the first input is empty.  Instead, it simply returns
the second input.

However, there are some cases where the space of must_rel,
while it still has its original empty value living in the wrong space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_flow.c
isl_test.c